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