#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l;
  string s;
  int n, m, p;
  while (cin >> n >> m >> p) {
    int mn = min(n / 1, min(m / 2, p / 4));
    long long sum = 0;
    for (i = 0; i < mn; i++) {
      sum += 7;
    }
    cout << sum << endl;
  }
}
