import itertools A,B = map(int,input().split()) if B <= A: A,B = B,A print(min(A,B) * 2)