#include <bits/stdc++.h>
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int i, j, k;
  i = a;
  j = b / 2;
  k = c / 4;
  int min = i;
  if (j < min) min = j;
  if (k < min) min = k;
  printf("%d\n", min * 7);
  return 0;
}
