spoj#POSAO. Jobs
Jobs
Little Domagoj has hands full of work. His jobs are organized in NxN matrix such that each cell represents one job. He can start doing job at cell (x,y) if and only if jobs at cells (x,y-1) and (x-1,y) are done(if they exist).
On the picture required jobs are shown for gray cells.
Domagoj has K computers which he will use for doing jobs. One computer is able to do at most one job in one second. Also, all computers need not to be used all the time. Help Domagoj and organize order in which computers will do jobs in least possible time.
Input
In the first line there are two integers N and K (1 ≤ N, K ≤ 109)
Output
Print least possible time in which all jobs can be done.
Example
Input:
3 2
Output:
6
Input:
5 1
Output:
25
Input:
4 4
Output:
7