import java.io.*;
import java.util.StringTokenizer;
public class CF1239A {

    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine());
        int M=Integer.parseInt(st.nextToken());
        int N=Integer.parseInt(st.nextToken());
        System.out.println(2*(M+N-1));
    }
    
}
