#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d = 0, l = 0, m = 0, n = 0;
  cin >> a >> b >> c;
  while (l <= a && m <= b && n <= c) {
    l += 1;
    m += 2;
    n += 4;
    d += 7;
  }
  cout << (d - 7);
  return 0;
}
