#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, S = 0;
  cin >> a >> b >> c;
  while (a > 0 && b > 1 && c > 3) {
    a--;
    b -= 2;
    c -= 4;
    S += 7;
  }
  cout << S;
  return 0;
}
