#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1e2 + 7;
int x[MAXN], y[MAXN], z[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  x[1] = x[4] = x[7] = x[8] = x[11] = x[14] = 1;
  y[2] = y[6] = y[9] = y[13] = 1;
  z[3] = z[5] = z[10] = z[12] = 1;
  long long a, b, c;
  cin >> a >> b >> c;
  long long mn = min(a / 3, min(b / 2, c / 2));
  a = a - mn * 3;
  b = b - mn * 2;
  c = c - mn * 2;
  long long mx = 0;
  for (int i = (int)1; i <= (int)7; i++) {
    long long tm = 0;
    long long ta = a, tb = b, tc = c;
    for (int j = (int)i; j <= (int)i + 6; j++) {
      if (ta < 0 || tb < 0 || tc < 0) break;
      tm++;
      ta -= x[j];
      tb -= y[j];
      tc -= z[j];
    }
    mx = max(mx, tm - 1);
  }
  cout << mx + mn * 7 << endl;
}
