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