#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int l, a, p;
  cin >> l >> a >> p;
  int c = 0;
  for (int i = 1; i <= l; i++) {
    if (a >= 2 && p >= 4) {
      c++;
      a -= 2;
      p -= 4;
    } else
      break;
  }
  cout << 7 * c << endl;
  return 0;
}
