Define the minimal bounding rectangle as the smallest rectangle containing a given lattice polygon. If the perimeter of the lattice polygon is equal to that of its minimal bounding rectangle, it is said to be convex. (Note that a "convex" lattice polygon is not necessarily convex in the usual sense of the word.) A staircase polygon is then defined as a convex polygon which contains two opposite corners of its bounding rectangle .