import sys A,B = map(int, sys.stdin.readline().strip().split()) print(min(A, B) * 2)