import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double x = sc.nextDouble(), y = sc.nextDouble(), z; z = Math.sqrt(x*x+y*y)*2 + 1; System.out.println((int)z); } }