A,B=map(int,input().split()) print(2*min(A,B))