a,b = map(int,input().split()) mab = min(a,b) print(mab*2)