#include #include using namespace std; int main(){ int A,B; cin >> A >> B; int s = min(A, B); cout << 2*s<< endl; }