#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int cnt = 0;
  for (int i = 1; i <= a; ++i) {
    if (2 * i <= b && 4 * i <= c) cnt++;
  }
  cout << 7 * cnt;
  return 0;
}
