import math._ object Main { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) val x, y = sc.nextInt val d = sqrt(x*x + y*y) println((d * 2 + 1).toInt) } }