#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  b = b / 2;
  c = c / 4;
  long long ans = min(a, min(b, c));
  cout << (ans * 1 + ans * 2 + ans * 4);
  return 0;
}
