#include <bits/stdc++.h>
using namespace std;
int ap[15] = {1, 2, 3, 1, 3, 2, 1, 1, 2, 3, 1, 3, 2, 1};
int main() {
  int a, b, c, max1, ans, i, as, o[5], temp, j;
  scanf("%d%d%d", &a, &b, &c);
  max1 = min(a / 3, min(b / 2, c / 2));
  ans = max1 * 7;
  a -= max1 * 3, b -= max1 * 2, c -= max1 * 2;
  for (i = 0, as = 0; 7 > i; i++) {
    o[1] = a, o[2] = b, o[3] = c;
    temp = 0;
    for (j = i; i + 7 > j; j++) {
      if (o[ap[j]] > 0) {
        o[ap[j]]--;
        temp++;
      } else
        break;
    }
    as = max(as, temp);
  }
  ans += as;
  printf("%d\n", ans);
  return 0;
}
