You are given n pieces and a m×m board. The rows and columns are numbered from 1 to m. A cell on the intersection of the rth row and cth column is denoted as as (r,c).
The game's goal is to place n pieces numbered from 1 to n on the board. The ith piece lies on (ri,ci) while the following rule must be satisfied:
For all pairs of pieces i and j,|ri−rj|≥k or |ci−cj|≥k. Here, |x| denotes the absolute value of x.
Determine the smallest size of the board m×m on which you can put n pieces according to the rules.
Input format
The only line contains two integer, n(1≤n≤1000000) denoting the number of pieces and k(1≤k≤1000000).
Output format
Print a single integer denoting the minimum value of m denoting the length of sides of the suitable board.
1 | 2 | 3 | ||
4 | 5 | |||