#include <bits/stdc++.h>
using namespace std;
long long modexpo(long long a, long long b) {
  long long res = 1LL;
  while (b > 0) {
    if (b & 1) res = (res * a) % 1000000007;
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return res;
}
int main() {
  vector<int> a(3);
  cin >> a[0] >> a[1] >> a[2];
  vector<int> idx({0, 1, 2, 0, 2, 1, 0});
  int f = min(a[0] / 3, min(a[1] / 2, a[2] / 2));
  a[0] -= 3 * f;
  a[1] -= 2 * f;
  a[2] -= 2 * f;
  int res = 0;
  for (int i = 0; i < 7; i++) {
    int s = i;
    vector<int> b = a;
    int curr = 0;
    while (b[idx[s]] > 0) {
      --b[idx[s]];
      curr++;
      s = (s + 1) % 7;
    }
    res = max(res, f * 7 + curr);
  }
  cout << res;
}
