#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, y, x;
  cin >> a >> b >> c;
  x = b / 2;
  y = c / 4;
  if (x <= y && x < a && x != 0)
    cout << x * 7;
  else if (x > y && y <= a && y != 0)
    cout << y * 7;
  else if (a <= x && a <= y)
    cout << a * 7;
  else
    cout << '0';
}
