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