{"problem":{"name":"Bishop","description":{"content":"We have a board with $H$ horizontal rows and $W$ vertical columns of squares. There is a bishop at the top-left square on this board. How many squares can this bishop reach by zero or more movements? ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"panasonic2020_b"},"statements":[{"statement_type":"Markdown","content":"We have a board with $H$ horizontal rows and $W$ vertical columns of squares. There is a bishop at the top-left square on this board. How many squares can this bishop reach by zero or more movements?\nHere the bishop can only move diagonally. More formally, the bishop can move from the square at the $r_1$\\-th row (from the top) and the $c_1$\\-th column (from the left) to the square at the $r_2$\\-th row and the $c_2$\\-th column if and only if exactly one of the following holds:\n\n*   $r_1 + c_1 = r_2 + c_2$\n*   $r_1 - c_1 = r_2 - c_2$\n\nFor example, in the following figure, the bishop can move to any of the red squares in one move:\n![image](https://img.atcoder.jp/panasonic2020/943f3f8428e6f8328924ff99681c932b.png)\n\n## Constraints\n\n*   $1 \\leq H, W \\leq 10^9$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$H \\ W$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"panasonic2020_b","tags":[],"sample_group":[["4 5","10\n\nThe bishop can reach the cyan squares in the following figure:\n![image](https://img.atcoder.jp/panasonic2020/b218e01560fe6e40e7d082ca57a64e6e.png)"],["7 3","11\n\nThe bishop can reach the cyan squares in the following figure:\n![image](https://img.atcoder.jp/panasonic2020/088830f8a244d99a9f95d20bf9a8d336.png)"],["1000000000 1000000000","500000000000000000"]],"created_at":"2026-03-03 11:01:14"}}