Given M number of 1x1 squares and N number of 2x2 squares, find the maximum length of square that can be formed using them. Its not mandatory to use all the squares.
Examples: (M,N)
- (8,0) -> 2 (4 1x1 squares used, max length of side = 2)
- (9,0) -> 3 ( all 9 1x1 squares used, max length of side =3)
- (0,18) -> 8 ( 16 squares used, max length = 8)
- (13, 3) -> 5 (arrange 3 2x2 in L shape, add 4 1x1 to the missing piece arrange 9 1x1 to the extra length and breadth of the square)