#include <bits/stdc++.h>
using namespace std;
int main() {
  int lemon, apple, pear;
  cin >> lemon >> apple >> pear;
  int l, a, p;
  l = lemon / 1;
  a = apple / 2;
  p = pear / 4;
  int answer = min(l, a);
  int fanswer = min(answer, p);
  cout << fanswer * 7;
}
