#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  const long long maxn = 7;
  vector<long long> food(3);
  for (long long i = 0; i < 3; i++) {
    cin >> food[i];
  }
  vector<long long> index = {1, 0, 0, 1, 2, 0, 2};
  auto calc = [&](long long pos) {
    vector<long long> temp(food);
    long long res = 0;
    bool ok = true;
    for (long long i = pos; i < maxn; i++) {
      if (temp[index[i]] == 0) {
        ok = false;
        break;
      }
      --temp[index[i]];
      ++res;
    }
    if (!ok) {
      return res;
    }
    vector<long long> wg(3), rem(3);
    for (long long i = 0; i < 3; i++) {
      wg[i] = temp[i] / (i == 0 ? 3 : 2);
      rem[i] = temp[i] % (i == 0 ? 3 : 2);
    }
    vector<long long> cnt(3, 0);
    if (rem[0] == 0) {
      ++cnt[0];
    } else if (rem[0] == 1) {
      cnt[0] += 2;
    } else if (rem[0] == 2) {
      cnt[0] += 5;
    }
    if (rem[1] == 1) {
      cnt[1] += 3;
    }
    if (rem[2] == 0) {
      cnt[2] += 4;
    } else if (rem[2] == 1) {
      cnt[2] += 6;
    }
    long long ret0 = wg[0] * maxn + res + cnt[0];
    long long ret1 = wg[1] * maxn + res + cnt[1];
    long long ret2 = wg[2] * maxn + res + cnt[2];
    return min({ret0, ret1, ret2});
  };
  long long ans = 0;
  for (long long i = 0; i < maxn; i++) {
    ans = max(ans, calc(i));
  }
  cout << ans << '\n';
  return 0;
}
