#include <bits/stdc++.h>
using namespace std;
long long power(long long a, int n) {
  if (n == 0) return 1;
  if ((n % 2) == 0)
    return power(a * a, n / 2);
  else
    return a * power(a * a, n / 2);
}
vector<bool> mark;
void seive(long long N) {
  mark.resize(N + 1);
  for (long long i = 2; i * i <= N; i++) {
    if (!mark[i]) {
      for (long long j = i * i; j <= N; j += i) {
        mark[j] = 1;
      }
    }
  }
}
vector<int> a1(150002), a2(150002);
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 w;
  w = a / 3;
  w = min(w, b / 2);
  w = min(w, c / 2);
  long long ans = 7 * w;
  vector<int> v(7);
  v[0] = 1;
  v[1] = 2;
  v[2] = 3;
  v[3] = 1;
  v[4] = 3;
  v[5] = 2;
  v[6] = 1;
  for (int i = 0; i < 7; i++) {
    long long a1 = a - 3 * w;
    long long b1 = b - 2 * w;
    long long c1 = c - 2 * w;
    long long ans1 = 7 * w;
    int j = 0;
    while (j < 7) {
      int p = (i + j) % 7;
      if (v[p] == 1) {
        if (a1 == 0) break;
        a1--;
      } else if (v[p] == 2) {
        if (b1 == 0) break;
        b1--;
      } else if (v[p] == 3) {
        if (c1 == 0) break;
        c1--;
      }
      j++;
      ans1++;
    }
    ans = max(ans, ans1);
  }
  cout << ans;
  return 0;
}
