#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  b = b - (b % 2);
  c = c - (c % 4);
  if (a == 0 || b == 0 || c == 0) {
    cout << "0" << endl;
    return 0;
  } else if (a == 1 || b == 2 || c == 4) {
    cout << "7" << endl;
    return 0;
  }
  int x = min(a, b / 2);
  int y = min(x, c / 4);
  cout << y * 7 << endl;
  return 0;
}
