#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int p1 = a, p2 = b / 2, p3 = c / 4;
  int num = min(p1, min(p2, p3));
  int sum = 7 * num;
  cout << sum << endl;
  return 0;
}
