#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int ans = 0;
  if (a > 2 && b > 1 && c > 1) {
    long long int x = min({a / 3, b / 2, c / 2});
    a -= x * 3;
    b -= x * 2;
    c -= x * 2;
    ans += x * 7;
  }
  long long int maxi = 0;
  for (long long int start = 0; start < 7; ++start) {
    long long int x = a, y = b, z = c, p = start;
    while (1) {
      if (p % 7 == 0 || p % 7 == 1 || p % 7 == 4) {
        if (!x) break;
        p++;
        x--;
      }
      if (p % 7 == 2 || p % 7 == 6) {
        if (!y) break;
        p++;
        y--;
      }
      if (p % 7 == 3 || p % 7 == 5) {
        if (!z) break;
        p++;
        z--;
      }
    }
    maxi = max(maxi, p - start);
  }
  ans += maxi;
  cout << ans << "\n";
}
