410479: GYM104025 E Equal
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
E. Equaltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
Aqua and Hiyori love equal numbers.
Aqua loves two integers $$$x$$$ and $$$y$$$, and she wants to perform some operations to make $$$x$$$ and $$$y$$$ equal. In one step, Aqua can do one of the following operations:
1. $$$x\leftarrow x+1$$$.
2. $$$y\leftarrow y+2$$$.
Now, Hiyori sets a problem to Aqua: What is the minimum number of steps required to make $$$x$$$ and $$$y$$$ equal?
But Aqua is stupid, could you help her?
InputThe first and only line contains two integers $$$x\ (0\leq x\leq 10^9)$$$ and $$$y\ (0\leq y\leq 10^9)$$$.
OutputOutput a single integer — the minimum number of operations required to make $$$x$$$ and $$$y$$$ equal.
ExamplesInput5 10Output
5Input
9 3Output
3