#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int a1, b1, c1;
  a1 = a / 1;
  b1 = b / 2;
  c1 = c / 4;
  int mul = 0;
  mul = min(min(a1, b1), c1);
  cout << 7 * mul << endl;
  return 0;
}
