#include <bits/stdc++.h>
using namespace std;
long long a, b, c;
long long kq;
long long kq1;
long long e[10] = {0, 1, 2, 0, 2, 1, 0};
long long d[5];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> a >> b >> c;
  kq = a / 3;
  if (kq > b / 2) kq = b / 2;
  if (kq > c / 2) kq = c / 2;
  a = a - kq * 3;
  b = b - kq * 2;
  c = c - kq * 2;
  kq1 = kq * 7;
  kq = kq * 7;
  for (long long i = 0; i < 7; i++) {
    long long tam = kq;
    bool ok = 0;
    long long tam1 = i;
    d[0] = a;
    d[1] = b;
    d[2] = c;
    while (1 == 1) {
      if (d[e[tam1]] > 0) {
        d[e[tam1]]--;
        tam++;
        tam1++;
        if (tam1 == 7) tam1 = 0;
      } else
        break;
    }
    kq1 = max(kq1, tam);
  }
  cout << kq1;
  return 0;
}
