#include using namespace std; typedef long long LL; int main() { LL x, y; cin >> x >> y; cout << 2 * (y + 3 * x) << endl; return 0; }