#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, t = 0, tmp;
  scanf("%d%d%d", &a, &b, &c);
  tmp = a;
  while (b > 0 && c > 0 && tmp > 0) {
    b -= 2;
    c -= 4;
    if (b < 0 || c < 0) break;
    t++;
    tmp--;
  }
  if (a >= t) {
    printf("%d\n", (t * 4 + t * 2 + t));
  }
  return 0;
}
