#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const long long LLINF = 1ll << 53;
void relaxmax(long long& r, long long v) { r = max(r, v); }
void relaxmin(long long& r, long long v) { r = min(r, v); }
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int ans = min(a, min(b / 2, c / 4));
  printf("%d\n", 7 * ans);
  return 0;
}
