#include <bits/stdc++.h>
int Max(int x, int y) { return x > y ? x : y; }
int Min(int x, int y) { return x > y ? y : x; }
int Day[8] = {1, 2, 3, 1, 3, 2, 1};
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int num = Min(Min(a / 3, b / 2), c / 2);
  a -= num * 3, b -= num * 2, c -= num * 2;
  int ans = 0;
  for (int i = 0; i < 7; ++i) {
    int day = i, x = a, y = b, z = c, sum = 0;
    while ((int)1) {
      if (Day[day] == 1) --x;
      if (Day[day] == 2) --y;
      if (Day[day] == 3) --z;
      if (x < 0 || y < 0 || z < 0) break;
      ++sum, ++day;
      if (day >= 7) day = 0;
    }
    ans = Max(ans, sum);
  }
  printf("%d\n", num * 7 + ans);
  return 0;
}
