#include using namespace std; using ll = long long; template T smax(T & x, T y) { if (x < y) { x = y; return true; } return false; } template T smin(T & x, T y) { if (x > y) { x = y; return true; } return false; } const int mod = 998244353; int sum(int x, int y) { if (x + y >= mod) { return x + y - mod; } return x + y; } int diff(int x, int y) { if (x >= y) { return x - y; } return x - y + mod; } int mult(int x, int y) { return (int) ((x * 1LL * y) % mod); } int pow(int x, int p) { int ans = 1; while (p > 0) { if ((p & 1) == 1) { ans = mult(ans, x); } x = mult(x, x); p >>= 1; } return ans; } int inv(int x) { return pow(x, mod - 2); } void solve() { int a, b, c; cin >> a >> b >> c; int ans = 2 * a; if (c >= 2) { c -= 2; ans += 3 + 2 * b; } ans += c / 2 * 3; cout << ans << "\n"; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t = 1; // cin >> t; while (t--) { solve(); } cerr << clock() * 1.0 / CLOCKS_PER_SEC << "\n"; return 0; }