#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long Min = min(a, b);
  Min = min(Min, c);
  long long day = 0;
  while (a + b + c >= 7 && a >= 3 && b >= 2 && c >= 2) {
    a -= 3;
    b -= 2;
    c -= 2;
    day += 7;
  }
  long long ans = 0;
  long long _a = a, _b = b, _c = c;
  for (long long i = 1; i <= 7; i++) {
    long long tmp = 0;
    a = _a;
    b = _b;
    c = _c;
    for (long long j = i; j <= i + 7; j++) {
      long long _j = j % 7;
      if (_j == 1 || _j == 4 || _j == 0) {
        if (!a) {
          ans = max(ans, tmp);
          break;
        }
        a--;
        tmp++;
      }
      if (_j == 2 || _j == 6) {
        if (!b) {
          ans = max(ans, tmp);
          break;
        }
        b--;
        tmp++;
      }
      if (_j == 3 || _j == 5) {
        if (!c) {
          ans = max(ans, tmp);
          break;
        }
        c--;
        tmp++;
      }
    }
    ans = max(ans, tmp);
  }
  cout << day + ans << endl;
}
