#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int ans = 0;
  int p = 0, q = 0, r = 0;
  while (1) {
    p += 1;
    q += 2;
    r += 4;
    if ((p > a) || (q > b) || (r > c))
      break;
    else
      ans += 7;
  }
  printf("%d", ans);
  return 0;
}
