#include <bits/stdc++.h>
using namespace std;
int days(int q, int a, int b, int c) {
  int day = 0;
  while (true) {
    if (q == 1 || q == 4 || q == 7) {
      a--;
      if (a < 0) {
        break;
      }
    } else if (q == 2 || q == 6) {
      b--;
      if (b < 0) {
        break;
      }
    } else {
      c--;
      if (c < 0) {
        break;
      }
    }
    day++;
    q++;
    if (q == 8) {
      q = 1;
    }
  }
  return day;
}
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int full = min(a / 3, min(b / 2, c / 2));
  a -= full * 3;
  b -= full * 2;
  c -= full * 2;
  int ans = full * 7;
  int mx = 0;
  for (int i = 1; i <= 7; i++) {
    int s = days(i, a, b, c);
    mx = max(s, mx);
  }
  cout << ans + mx;
  return 0;
}
