let inpt = readLine()!.split(separator: " ").map{Int($0)} func sqrt(_ min:Int, _ max:Int, _ target:Int)->Int { if(max == min) { return max * 2 + 1 } if(max-min <= 1) { return max * 2 - 1 } let mid = (max + min) / 2 if(mid * mid > target) { return sqrt(min, mid, target) } else { return sqrt(mid, max, target) } } let hankei2 = inpt[0]!*inpt[0]!+inpt[1]!*inpt[1]! let ans = sqrt(0, hankei2, hankei2) print(ans)