#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a, b, c;
  cin >> a >> b >> c;
  long long ans = 0, x = 2e9;
  x = min(x, a / 3);
  x = min(x, b / 2);
  x = min(x, c / 2);
  ans += x * 7;
  a -= x * 3;
  b -= x * 2;
  c -= x * 2;
  int an = -1;
  for (int i = 1; i <= 7; ++i) {
    int cnt = 0, x = a, y = b, z = c;
    for (int j = i;; ++j, j %= 7) {
      if (j == 1 || j == 4) {
        if (y == 0) break;
        --y;
      } else if (j == 2 || j == 3 || j == 6) {
        if (x == 0) break;
        --x;
      } else {
        if (z == 0) break;
        --z;
      }
      ++cnt;
    }
    an = max(an, cnt);
  }
  cout << ans + an;
}
