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