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