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