package no98; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); for(int a=1;a<=40000;a++) { if ((x * x + y * y) * 4 < a * a) { System.out.println(a); return; } } } }