import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); int y = scan.nextInt(); scan.close(); double r = 2 * Math.sqrt(x * x + y * y); if(r == 0) { System.out.println(1); }else { System.out.println((int)r + 1); } } }