#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e4 + 10;
const long long INF = 1e9;
const double EPS = 1e-12;
const long long MINNUM = -1000000000000000ll;
long long n, k;
long long ans;
long long secAns = MINNUM;
long long foundIdx;
long long curAns = MINNUM;
string st;
vector<int> v;
int a, b, c;
vector<long long> pr;
vector<long long> parents;
bool isSimple(long long r) {
  for (long long t = 2; t * t <= r; t++) {
    if (r % t == 0) return false;
  }
  return true;
}
int main() {
  cin >> a >> b >> c;
  int mi = min(min(a, b / 2), c / 4);
  cout << mi * 7;
  return 0;
}
