#include<iostream>                                                                                                                                
#include<stdio.h>                                                                                                                                 
using namespace std;                                                                                                                              
                                                                                                                                                  
int main()                                                                                                                                        
{                                                                                                                                                 
        int a, b, cnt = 0;                                                                                                                        
        scanf("%d%d", &a, &b);                                                                                                                    
        if (a > b) {                                                                                                                              
                cnt += a;                                                                                                                         
                a--;                                                                                                                              
        }                                                                                                                                         
        else {                                                                                                                                    
                cnt += b;                                                                                                                         
                b--;                                                                                                                              
        }                                                                                                                                         
                                                                                                                                                  
        if (a > b)                                                                                                                                
                cnt += a;                                                                                                                         
        else                                                                                                                                      
                cnt += b;                                                                                                                         
                                                                                                                                                  
        printf("%d", cnt);                                                                                                                        
}                                                                                                                                              

Measured memory_bytes: 256