#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b, c;
  cin >> a >> b >> c;
  a /= 1;
  b /= 2;
  c /= 4;
  int temp = min(a, min(b, c));
  cout << temp * 7 << endl;
  return 0;
}
