import java.util.Scanner; class Main { public static void main(String[] args) throws Exception { Scanner in = new Scanner(System.in); double x_p = in.nextDouble(); double y_p = in.nextDouble(); int ans = 0; x_p = Math.abs(x_p); y_p = Math.abs(y_p); double r = Math.sqrt(Math.pow(x_p,2) + Math.pow(y_p,2)); ans = (int)(r*2) + 1; System.out.println(ans); } }