#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, o, i, get1 = 0, get2 = 0, k = 0, l = 0, j;
  cin >> m >> n >> o;
  for (i = 1; i <= m; i++) {
    if (m > 0 && n > 1 && o > 3) {
      n = n - 2;
      k++;
      o = o - 4;
      l++;
    } else
      break;
  }
  j = i - 1;
  int sum = j + k * 2 + l * 4;
  cout << sum << endl;
  return 0;
}
