#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5;
long long remain[MAXN], a[MAXN];
int main() {
  for (int i = 0; i < 3; i++) {
    scanf("%lld", &remain[i]);
    if (i == 0)
      a[i] = 3LL;
    else
      a[i] = 2LL;
  }
  long long ans = 0;
  for (long long k = 0; k < 7; k++) {
    long long day = 1e17;
    long long tmp[MAXN];
    for (long long i = 0; i < 3; i++) {
      day = min(day, remain[i] / a[i]);
    }
    for (long long i = 0; i < 3; i++) {
      tmp[i] = remain[i] - (a[i] * day);
    }
    long long cnt = 0;
    for (long long i = k; i < k + 7; i++) {
      long long cur = i % 7;
      long long idx;
      if (cur == 0 || cur == 3LL || cur == 6LL) {
        idx = 0;
      } else if (cur == 1LL || cur == 5LL) {
        idx = 1LL;
      } else if (cur == 2LL || cur == 4LL) {
        idx = 2LL;
      }
      tmp[idx]--;
      if (tmp[idx] < 0) {
        ans = max(ans, (day * 7LL) + cnt);
        break;
      }
      cnt++;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
