#include <bits/stdc++.h>
using namespace std;
int main() {
  long long A, B, C;
  cin >> A >> B >> C;
  string s[13] = {"m", "t", "w", "th", "f", "st", "su",
                  "m", "t", "w", "th", "f", "st"};
  long long f = 0, r = 0, c = 0;
  for (int i = 0; i < 7; i++) {
    if (s[i] == "m" || s[i] == "th" || s[i] == "su") {
      f += 1;
    } else if (s[i] == "t" || s[i] == "st") {
      r += 1;
    } else {
      c += 1;
    }
  }
  long long x = min(A, min(B, C));
  long long y = min(A / f, min(B / r, C / c));
  long long ans = y * 7;
  A -= y * f;
  B -= y * r;
  C -= y * c;
  y = 0;
  for (int i = 0; i < 7; i++) {
    long long p = A, q = B, r = C;
    x = 0;
    for (int j = i; j < i + 7; j++) {
      if ((s[j] == "m" || s[j] == "th" || s[j] == "su") && p > 0) {
        p -= 1;
        x += 1;
      } else if ((s[j] == "t" || s[j] == "st") && q > 0) {
        q -= 1;
        x += 1;
      } else if ((s[j] == "w" || s[j] == "f") && r > 0) {
        r -= 1;
        x += 1;
      } else {
        break;
      }
      y = max(y, x);
    }
  }
  cout << ans + y << endl;
  return 0;
}
