#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int a, b, c;
  int idx[7] = {0, 1, 2, 0, 2, 1, 0};
  scanf("%d%d%d", &a, &b, &c);
  int t = 0;
  if (a >= 3 && b >= 2 && c >= 2) {
    t = min(a / 3, b / 2);
    t = min(t, c / 2);
    a = a - t * 3;
    b = b - t * 2;
    c = c - t * 2;
  }
  t = t * 7;
  int ans = 0;
  for (int i = 0; i < 7; i++) {
    int r[4];
    r[0] = a, r[1] = b, r[2] = c;
    int day = i, cur = 0;
    while (r[idx[day]] > 0) {
      cur++;
      r[idx[day]]--;
      day = (day + 1) % 7;
    }
    ans = max(ans, t + cur);
  }
  printf("%d", ans);
  return 0;
}
