import java.util.Scanner; public class pre { public static void main(String[] args) { Scanner s = new Scanner(System.in); double n = s.nextDouble(),m = s.nextDouble(); double r = Math.sqrt(Math.pow(n,2) + Math.pow(m,2)); System.out.println((int)Math.floor(2 * r) + 1); } }