#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  bool is = false;
  for (int i = a; i >= 1; i--) {
    if (b >= 2 * i && c >= 4 * i) {
      is = true;
      cout << i + (2 * i) + (4 * i) << endl;
      break;
    }
  }
  if (!is) cout << 0 << endl;
  return 0;
}
