#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  long long r = 0;
  for (int i = 1; i <= a; i++)
    if (i * 2 <= b && i * 4 <= c) r = i;
  printf("%lld", r + r * 2 + r * 4);
}
