* Line 1: A single integer indicating the maximum number of 'J' signs
that Bessie can use. If there is no valid solution for
arranging the signs, output -1.
Bessie can either choose to label pastures 1 and 3 with 'J' signs, or
alternatively pastures 2 and 4.