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