a, b = (int(s) for s in input().split()) print(min(a, b) * 2)