#P10562. [ICPC 2024 Xi'an I] Triangle
[ICPC 2024 Xi'an I] Triangle
Description
There are three points , , in the plane rectangular coordinate system. Define the size of triangle as the number of squares that belong to it.
For integers , one square is defined by four points , , , . We consider a square to belong to a triangle if half or more of it is inside the triangle.
For example, when , the size of triangle will be . The image below shows which squares are counted in the triangle.

Input Format
The first and only line contains two integers and .
Output Format
Print an integer: the size of triangle .
6 8
24
5 5
15
1 999999
500000
京公网安备 11011102002149号