A,B = [int(i) for i in input().split()] print(min(A,B)*2)