#include <bits/stdc++.h>
using namespace std;
long long modularExponentiation(long long x, long long n, long long M) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return modularExponentiation((x * x) % M, n / 2, M);
  return (x * modularExponentiation((x * x) % M, (n - 1) / 2, M)) % M;
}
long long binaryExponentiation(long long x, long long n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return binaryExponentiation(x * x, n / 2);
  else
    return x * binaryExponentiation(x * x, (n - 1) / 2);
}
long long GCD(long long A, long long B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
long long extended_GCD(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = extended_GCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return gcd;
}
long long modinv(long long a, long long mod) {
  long long x, y;
  extended_GCD(a, mod, x, y);
  if (x < 0) x += mod;
  return x;
}
long long modPrimeInverse(long long A, long long M) {
  return modularExponentiation(A, M - 2, M);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  vector<int> a(3);
  cin >> a[0] >> a[1] >> a[2];
  vector<int> idx({0, 1, 2, 0, 2, 1, 0});
  int full = min({a[0] / 3, a[1] / 2, a[2] / 2});
  a[0] -= full * 3;
  a[1] -= full * 2;
  a[2] -= full * 2;
  int ans = 0;
  for (int start = 0; start < 7; ++start) {
    int day = start;
    vector<int> b = a;
    int cur = 0;
    while (b[idx[day]] > 0) {
      --b[idx[day]];
      day = (day + 1) % 7;
      ++cur;
    }
    ans = max(ans, full * 7 + cur);
  }
  cout << ans << endl;
  return 0;
}
