import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); long no1 = sc.nextLong(); long no2 = sc.nextLong(); long count = 0; while(no1!=1) { no1 = no1-1; count++; } while(no2!=1) { no2 = no2-1; count++; } System.out.println(count); } }