#include <bits/stdc++.h>
int main() {
  int a, b, c;
  int week[8], sum = 0, i, max = -1, x, ans = 0;
  scanf("%d%d%d", &a, &b, &c);
  while (a >= 3 && b >= 2 && c >= 2) {
    a -= 3;
    b -= 2;
    c -= 2;
    sum += 7;
  }
  for (i = 0; i < 7; i++) {
    week[0] = a;
    week[1] = b;
    week[2] = c;
    week[3] = a;
    week[4] = c;
    week[5] = b;
    week[6] = a;
    x = i;
    ans = 0;
    while (week[x]) {
      switch (x) {
        case 0:
          week[0]--;
          week[3]--;
          week[6]--;
          break;
        case 1:
          week[1]--;
          week[5]--;
          break;
        case 2:
          week[2]--;
          week[4]--;
          break;
        case 3:
          week[0]--;
          week[3]--;
          week[6]--;
          break;
        case 4:
          week[2]--;
          week[4]--;
          break;
        case 5:
          week[1]--;
          week[5]--;
          break;
        case 6:
          week[0]--;
          week[3]--;
          week[6]--;
          break;
      }
      ans++;
      x = (x + 1) % 7;
    }
    if (max < ans) max = ans;
  }
  printf("%d", max + sum);
  return 0;
}
