#include using namespace std; using ll = long long; using ld = long double; // #define int long long #define pii pair #define pll pair #define vi vector #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define mp make_pair #define pb push_back #define sz(v) (int)(v).size() // #define endl '\n' const ld eps = 1e-8; const ll mod = 1e9 + 7; const int inf0 = 1e9 + 10; const ll inf = 2e18 + 10; void solve(); signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); #ifdef LC freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); #endif cout << fixed << setprecision(20); int t = 1; //cin >> t; while (t--) { solve(); } return 0; } const int N = 2e5; void solve() { int a, b, c; cin >> a >> b >> c; c /= 2; if (c == 0) { cout << 2 * a << "\n"; } else { cout << 2 * (a + b) + 3 * c << "\n"; } } // g++ -DLC -o a a.cpp && ./a