#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long a, b, c;
  cin >> a >> b >> c;
  long long x1 = a / 3;
  long long x2 = b / 2;
  long long x3 = c / 2;
  long long ans = min(x1, min(x2, x3));
  vector<long long> v{1, 2, 3, 1, 3, 2, 1, 1, 2, 3, 1, 3, 2, 1};
  if (a - ans * 3 >= 3)
    a = 3;
  else
    a = a % 3;
  if (b - ans * 2 >= 2)
    b = 2;
  else
    b = b % 2;
  if (c - ans * 2 >= 2)
    c = 2;
  else
    c = c % 2;
  long long ma = 0;
  ans = ans * 7;
  for (long long i = 0; i < 7; i++) {
    long long p = a;
    long long q = b;
    long long r = c;
    long long co = 0;
    for (long long j = i; j < i + 7; j++) {
      if (v[j] == 1) {
        if (p > 0) {
          p--;
          co++;
        } else
          break;
      } else if (v[j] == 2) {
        if (q > 0) {
          q--;
          co++;
        } else
          break;
      } else if (v[j] == 3) {
        if (r > 0) {
          r--;
          co++;
        } else
          break;
      }
    }
    ma = max(ma, co);
  }
  cout << ans + ma;
  return 0;
}
