#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
int main() {
  cin.sync_with_stdio(false);
  int a, b, c, numa, numb, numc;
  while (cin >> a >> b >> c) {
    numa = a;
    numb = b / 2;
    numc = c / 4;
    cout << min(numa, min(numb, numc)) * 7 << endl;
  }
  return 0;
}
