Whenever the Hatter, the March Hare, and the Dormouse sit down for tea, they change seats along the table multiple times. On the table, there are tea cups arranged in a rectangle of size M \times N, numbered from to M \times N, with each number appearing exactly once.
The Hatter selects the cups with the largest numbers from each row, pours tea into them, drinks it, and sums the numbers to obtain .
The March Hare selects the cups with the largest numbers from each column, pours tea into them, drinks it, and sums the numbers to obtain .
Afterward, the Dormouse wakes up, adds the numbers and , and then falls back asleep. What is the minimum number the Dormouse could have calculated?
The input file contains two numbers and separated by a space. All numbers in the input file are natural and do not exceed .
In the output file, print the minimum number the Dormouse could have calculated.
Example 1