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