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