TC100
Tank armada of countries lined up Tsuripopii M to N columns of tanks in each. The tanks were model "TS-100" (Tank 100-year old), so could either move simultaneously in the same direction in a straight line, or simultaneously turn on a dime at the same angle multiple of 90°. The dictator, who staggered under the throne, decided to hold a parade to scare the international community. After the command "As machines!" and "Start the engines!" Some engines do not tank bred and, therefore, some of them could not participate in the parade. What is the maximum number of tanks that are simultaneously moved from the place, can be seen on the parade a dictator?
Input
The program reads a space of M, N (1 ≤ M, N ≤ 200) and the number of stationary tanks (0 ≤ K ≤ M·N), then through a gap K of pairs of distinct numbers X, Y, respectively, number of columns and the position number in the column each tank.
Output
The program displays only the required number.