Олимпиадный тренинг

Задача 38683. Tiles


Задача

Темы:
When carrying out repairs in the apartment, the designer suggested laying out the wall with a pattern of square tiles, turning them by 45°. The length of the diagonal of a square is 2 dm.

The wall to be tiled has dimensions n x times; m dm, while the numbers n and m – whole even numbers. To cover such a wall, you need a certain number of whole square tiles, as well as several triangular tile trims. The picture on the next page shows an example of a 4 x wall tiling. 6 dm, in this case, 8 whole square tiles were used.


Given the dimensions of the wall n and m dm, determine how many whole square tiles this pattern will contain.
The answer to this problem is some expression that can contain integers, variables n and m (written in English letters), addition (denoted by "+", subtraction (denoted by «−»), multiplication ( denoted by «*»), divisions  (noted by «/»), and parentheses to change the order of operations. An entry like "2n" to denote the product of the number 2 and the variable n is incorrect, you need to write "2 * n".
Your expression must give the correct answer for any even values ​​of  n and m, for example, for n = 4 and m = 6, the value of the expression must be equal to 8.
An example of a correct response form.
m / 2 + (m * n − m) * 2