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