#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  while (scanf("%d%d%d", &a, &b, &c) != EOF) {
    int ans = 0;
    for (int i = 1; i <= a; i++) {
      if (2 * i <= b && 4 * i <= c)
        ans = 7 * i;
      else
        break;
    }
    cout << ans << endl;
  }
  return 0;
}
