#include <bits/stdc++.h>
int main() {
  int l, a, p;
  std::cin >> l >> a >> p;
  int total = 0;
  while (l > 0 && a > 0 && p > 0) {
    l--;
    a -= 2;
    p -= 4;
    if (l >= 0 && a >= 0 && p >= 0) total += 7;
  }
  std::cout << total << std::endl;
  return 0;
}
