#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b, c, count = 0;
  cin >> a >> b >> c;
  if (a < 1 || b < 2 || c < 4) {
    cout << "0";
  } else {
    while (a >= 1 && b >= 2 && c >= 4) {
      a--;
      b -= 2;
      c -= 4;
      count += 7;
    }
    cout << count;
  }
  return 0;
}
