#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long a, b, c;
  cin >> a >> b >> c;
  long long weeks = min(a / 3, min(b / 2, c / 2));
  a -= 3 * weeks;
  b -= 2 * weeks;
  c -= 2 * weeks;
  long long ans = 0;
  bool cont;
  long long tmpa = a;
  long long tmpb = b;
  long long tmpc = c;
  for (int i = 0; i < 7; ++i) {
    cont = true;
    a = tmpa;
    b = tmpb;
    c = tmpc;
    for (long long j = 0; cont && j < 7; j++) {
      int day = (j + i) % 7;
      switch (day) {
        case 0:
        case 3:
        case 6:
          if (a == 0) {
            ans = max(ans, j);
            cont = false;
          } else {
            a--;
          }
          break;
        case 1:
        case 5:
          if (b == 0) {
            ans = max(ans, j);
            cont = false;
          } else {
            b--;
          }
          break;
        case 2:
        case 4:
          if (c == 0) {
            ans = max(ans, j);
            cont = false;
          } else {
            c--;
          }
          break;
      }
    }
  }
  cout << ans + weeks * 7 << endl;
  return 0;
}
