package yukicoder; import java.util.Scanner; public class N98 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); double r = Math.abs(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))); if(r % 1 == 0){ System.out.println((int) Math.round(r) * 2 + 1); }else{ System.out.println((int) Math.floor(r * 2) + 1); } } }