#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, arr[3];
  for (i = 0; i < 3; i++) {
    cin >> arr[i];
  }
  arr[1] = arr[1] / 2;
  arr[2] = arr[2] / 4;
  sort(arr, arr + 3);
  arr[0] = arr[0] * 7;
  cout << arr[0] << endl;
}
