#include <bits/stdc++.h>
using namespace std;
long long i, j = 0, k, sum = 0, ctr = 0, c = 0, ok = 0;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a, b, c;
  cin >> a >> b >> c;
  for (i = a; i >= 0; i--) {
    if (c >= i * 4 && b >= i * 2) {
      ok = i;
      break;
    }
  }
  cout << ok * 7;
  return 0;
}
