#include #define rep(i, j) for (int i = 0; i < (int)(j); ++i) #define rep1(i, j) for (int i = 1; i < (int)(j); ++i) #define all(v) (v).begin(), (v).end() using namespace std; using ll = long long; using ld = long double; signed main() { int a, b; cin >> a >> b; cout << min(a, b) * 2 << endl; }