#include <bits/stdc++.h>
int main(void) {
  int lemons, apples, pears;
  int sm[3];
  scanf("%d %d %d", &lemons, &apples, &pears);
  sm[0] = lemons;
  sm[1] = apples / 2;
  sm[2] = pears / 4;
  int i, min;
  min = sm[0];
  for (i = 0; i < 3; i++) {
    if (sm[i] < min) min = sm[i];
  }
  int number = min + min * 2 + min * 4;
  printf("%d", number);
  return 0;
}
