import java.util.*; public class Run { public static void main (String arg[]) { Scanner scan = new Scanner(System.in); double X = scan.nextInt(); double Y = scan.nextInt(); int ans; ans = (int) (Math.pow(Math.pow(X, 2)+Math.pow(Y, 2), 0.5) * 2); System.out.println(ans + 1); } }