#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, sum;
  scanf("%d%d%d", &a, &b, &c);
  if (a == 0 || b < 2 || c < 4)
    printf("0");
  else {
    int k = 9000;
    d = min(k, a);
    d = min(d, b / 2);
    d = min(d, c / 4);
    a = d;
    b = 2 * d;
    c = 4 * d;
    sum = a + b + c;
    printf("%d", sum);
  }
  return 0;
}
