#include <bits/stdc++.h>
using namespace std;
long long days[] = {0, 1, 2, 3, 1, 3, 2, 1};
long long a, b, c;
bool judge(long long k, long long st) {
  long long ta = 0, tb = 0, tc = 0;
  if (st + k - 1 < 7) {
    for (long long i = 0; i < k; i++) {
      long long typ = days[(st + i - 1) % 7 + 1];
      if (typ == 1)
        ta++;
      else if (typ == 2)
        tb++;
      else
        tc++;
    }
    if (ta > a || tb > b || tc > c) return false;
  } else {
    for (long long i = 0; st + i - 1 < 7; i++) {
      long long typ = days[(st + i - 1) % 7 + 1];
      if (typ == 1)
        ta++;
      else if (typ == 2)
        tb++;
      else
        tc++;
    }
    k -= (7 - st + 1);
    ta += (k / 7) * 3;
    tb += (k / 7) * 2;
    tc += (k / 7) * 2;
    k %= 7;
    for (long long i = 1; i <= k; i++) {
      long long typ = days[i];
      if (typ == 1)
        ta++;
      else if (typ == 2)
        tb++;
      else
        tc++;
    }
    if (ta > a || tb > b || tc > c) return false;
  }
  return true;
}
signed main() {
  long long ans = 0;
  scanf("%lld%lld%lld", &a, &b, &c);
  long long m = max(a / 3, max(b / 2, c / 2)) + 2;
  m *= 7;
  for (long long i = 1; i <= 7; i++) {
    long long l = 0, r = 1e18;
    while (l < r) {
      long long mid = (l + r + 1) / 2;
      if (judge(mid, i))
        l = mid;
      else
        r = mid - 1;
    }
    ans = max(ans, l);
  }
  printf("%lld\n", ans);
  return 0;
}
