#CCBCHBA0000117. Đếm ô có tổng chẵn (Count Even-Sum Cells)

Đếm ô có tổng chẵn (Count Even-Sum Cells)

Count Even-Sum Cells

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given n,mn,m, count pairs (i,j)(i,j) such that 1≤i≤n1\le i\le n, 1≤j≤m1\le j\le m and i+ji+j is even. Each pair represents one distinct cell.

Input

One line contains n,mn,m.

Output

Print the count of valid pairs.

Subtasks

  • Subtask 1 (20%): 1≤n,m≤101\le n,m\le 10.

  • Subtask 2 (30%): 1≤n,m≤1001\le n,m\le 100.

  • Subtask 3 (50%): 1≤n,m≤10001\le n,m\le 1000.

Examples

Example 1

Input:

3 3

Output:

5

Explanation:

The 3×3 grid has 5 even-sum cells, including the top-left cell.

Example 2

Input:

1 2

Output:

1

Explanation:

The 1×2 grid has 1 even-sum cells, including the top-left cell.