#include int main() { int A, B; std::cin >> A >> B; std::cout << std::min(A, B) * 2 << "\n"; }