#include <bits/stdc++.h>
using namespace std;
long long mode = 1000000000 + 7;
vector<pair<long long, long long> > v[101];
int main() {
  vector<long long> v(3);
  cin >> v[0] >> v[1] >> v[2];
  long long full = min(v[0] / 3, min(v[1] / 2, v[2] / 2));
  long long ans = 7 * full;
  v[0] -= 3 * full;
  v[1] -= 2 * full;
  v[2] -= 2 * full;
  long long idx[] = {1, 2, 3, 1, 3, 2, 1};
  long long i;
  long long fin = 0;
  vector<long long> cp(3);
  for (i = 0; i < 7; i++) {
    long long cur = 0;
    long long cday = i;
    for (long long j = 0; j < 3; j++) cp[j] = v[j];
    while (1) {
      if (cp[idx[cday] - 1]) {
        cp[idx[cday] - 1] -= 1;
        cur += 1;
      } else {
        fin = max(fin, cur);
        break;
      }
      cday = (cday + 1) % 7;
    }
  }
  ans = ans + fin;
  cout << ans;
}
