import java.util.Scanner; public class No98 { public static void main(String[] args){ Scanner sc =new Scanner(System.in); System.out.println((int)(Math.sqrt(Math.pow(sc.nextInt(),2)+Math.pow(sc.nextInt(), 2))*2)+1); } }