#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, f;
  cin >> a >> b >> c;
  while (1) {
    if (a > 0 && b / a >= 2 && c / a >= 4) {
      cout << a + 2 * a + 4 * a << endl;
      break;
    }
    if (a == 0) {
      cout << "0";
      break;
    }
    a = a - 1;
  }
}
