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