#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long ans = 0;
  for (long long i = 1; i <= 7; i++) {
    long long x = a, y = b, z = c, cnt = 0;
    for (long long j = i; j <= 7; j++) {
      if (j == 2 || j == 6) {
        if (y > 0)
          y--;
        else
          break;
      } else if (j == 3 || j == 5) {
        if (z > 0)
          z--;
        else
          break;
      } else {
        if (x > 0)
          x--;
        else
          break;
      }
      cnt++;
    }
    long long k = (min(x / 3, min(y / 2, z / 2)));
    x -= k * 3;
    y -= k * 2;
    z -= k * 2;
    cnt += k * 7;
    for (long long j = 1; j <= 7; j++) {
      if (j == 2 || j == 6) {
        if (y > 0)
          y--;
        else
          break;
      } else if (j == 3 || j == 5) {
        if (z > 0)
          z--;
        else
          break;
      } else {
        if (x > 0)
          x--;
        else
          break;
      }
      cnt++;
    }
    ans = max(ans, cnt);
  }
  cout << ans;
}
int main() {
  long long t = 1;
  while (t--) {
    solve();
    cout << endl;
  }
}
