A security guard guards a grid of north-south and east-west paths around a bunch of cargo crates in neat lines and rows. He does a patrol route occasionally, subject to two rules;
a. he ends the route where he started;
b. he doesn't follow the same path twice.
So, if he has just one crate to guard, he walks north-east-south-west. Zero unguarded paths.
a 2 x 1 area is harder. north-east-east-south-west-west, one path is left unguarded.
2 x 2 might start at the middle; north-east-south-west-south-west-north-east. Or at a corner, 2N 2E 2S 2W, or some other route, but four paths are left unguarded.
So.. how many roads at left unguarded if the guard uses an optimal route around m lines x n rows of crates?