import sys,random,bisect from collections import deque,defaultdict from heapq import heapify,heappop,heappush from itertools import permutations from math import log,gcd input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) X,Y = mi() if X==Y: print(X+Y) elif X < Y: print(Y+X+(Y+X-1)-(2*X)) else: print(Y+X+(Y+X-1)-(2*Y))