#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int day[10];
int sim() {
  int cnt = 0;
  for (int i = 1; i < 8; i++) {
    if (day[i] == 1) {
      if (!a) return cnt;
      cnt++;
      a--;
    } else if (day[i] == 2) {
      if (!b) return cnt;
      cnt++;
      b--;
    } else {
      if (!c) return cnt;
      cnt++;
      c--;
    }
  }
  return cnt;
}
int main() {
  int A, B, C;
  scanf("%d%d%d", &A, &B, &C);
  day[1] = 2;
  day[2] = 1;
  day[3] = 1;
  day[4] = 2;
  day[5] = 3;
  day[6] = 1;
  day[7] = 3;
  int tot = 0;
  for (int st = 1; st < 8; st++) {
    int now = 0, f = 0;
    a = A, b = B, c = C;
    for (int cur = st; cur < 8; cur++) {
      if (day[cur] == 1) {
        if (a == 0) {
          tot = max(tot, now);
          f = 1;
          break;
        }
        a--;
        now++;
      } else if (day[cur] == 2) {
        if (b == 0) {
          tot = max(tot, now);
          f = 1;
          break;
        }
        b--;
        now++;
      } else {
        if (c == 0) {
          tot = max(tot, now);
          f = 1;
          break;
        }
        c--;
        now++;
      }
    }
    if (f == 0) {
      if (a < 3 || b < 2 || c < 2) {
        now += sim();
        tot = max(tot, now);
        continue;
      }
      int w = 1000000000;
      w = min(w, a / 3);
      w = min(w, b / 2);
      w = min(w, c / 2);
      a = a - w * 3;
      b = b - w * 2;
      c = c - w * 2;
      now += (w * 7);
      while (1) {
        int x = sim();
        now += x;
        if (x < 7) break;
      }
      tot = max(tot, now);
    }
  }
  printf("%d", tot);
  return 0;
}
