import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt() * 2; int y = sc.nextInt() * 2; int left = 0; int right = Integer.MAX_VALUE; while (right - left > 1) { int m = (left + right) / 2; if (Math.pow(x, 2) + Math.pow(y, 2) < Math.pow(m, 2)) { right = m; } else { left = m; } } System.out.println(right); } }