x, y = gets.split.map &:to_i p (2*Math.sqrt(x*x+y*y)).floor + 1