
In the 3×2 grid shown above, the rectangles whose vertices all lie on grid points and whose sides are vertical or horizontal are: six 1×1, four 2×1, three 1×2, two 2×2, two 3×1, and one 3×2, for a total of 18. A grid point is the intersection of a vertical line and a horizontal line.
You are given a grid of size n×m. Count how many rectangles have all four vertices on grid points, have vertical or horizontal sides, and have perimeter at least p. A rectangle of size w×h has perimeter 2(w+h).
The first and only line of standard input contains three integers n, m, and p separated by spaces (1≤n,m≤5000, 4≤p≤2(n+m)). Here n and m are the dimensions of the grid, and p is the lower bound on the rectangle perimeter.
On the first line of standard output, print a single integer: the number of rectangles in the n×m grid whose vertices lie on grid points, whose sides are vertical or horizontal, and whose perimeter is at least p.