#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos((long double)-1.0);
const double EPS = 1e-10;
const int MOD = 1e9 + 7;
template <typename T>
void cmin(T &x, T y) {
  if (y < x) x = y;
}
template <typename T>
void cmax(T &x, T y) {
  if (y > x) x = y;
}
long long qpow(long long x, long long n, long long mod = MOD) {
  if (n < 0) return 0;
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
long long sq(long long x) { return x * x; }
long long read() {
  long long res = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) {
    res = res * 10 + (c - '0');
    c = getchar();
  }
  return res;
}
namespace Solver {
void InitOnce() { int t; }
int a, b, c;
void Read() {
  int res = scanf("%d%d%d", &a, &b, &c);
  if (res == -1) exit(0);
}
int ca[7] = {1, 0, 0, 1, 0, 0, 1};
int cb[7] = {0, 1, 0, 0, 0, 1, 0};
int cc[7] = {0, 0, 1, 0, 1, 0, 0};
void Solve() {
  int t = min({a / 3, b / 2, c / 2});
  a -= t * 3;
  b -= t * 2;
  c -= t * 2;
  int ans = t * 7;
  for (int i = 0; i < 7; ++i) {
    int sa = 0, sb = 0, sc = 0;
    for (int j = 0; j < 7; ++j) {
      sa += ca[(i + j) % 7];
      sb += cb[(i + j) % 7];
      sc += cc[(i + j) % 7];
      if (sa <= a && sb <= b && sc <= c) cmax(ans, t * 7 + j + 1);
    }
  }
  printf("%d\n", ans);
  return;
}
}  // namespace Solver
int main() {
  Solver::InitOnce();
  while (true) {
    Solver::Read();
    Solver::Solve();
  }
  return 0;
}
