#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using str = string;
using srt = short;
const int INF = (int)1e9 + 7;
const int MOD = 998244353;
const ll inf = (ll)1e18;
const ll mod = (int)1e9 + 7;
const int N = 100000005;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ll a, b, c;
  cin >> a >> b >> c;
  ll ans = 0;
  for (int i = 0; i < 7; ++i) {
    ll l = 0, r = inf;
    while (l < r) {
      ll mid = l + r + 1 >> 1;
      ll good = mid / 7;
      ll aa = a;
      ll bb = b;
      ll cc = c;
      aa -= good * 3;
      bb -= good * 2;
      cc -= good * 2;
      ll ost = mid % 7;
      int j = i;
      for (int gg = 0; gg < ost; ++gg, j %= 7) {
        if (j == 0 || j == 3 || j == 6)
          aa--;
        else if (j == 1 || j == 5)
          bb--;
        else
          cc--;
        j++;
      }
      if (aa < 0 || bb < 0 || cc < 0) {
        r = mid - 1;
      } else {
        l = mid;
      }
    }
    ans = max(ans, r);
  }
  cout << ans;
}
