#include <bits/stdc++.h>
using namespace std;
int findLessMultiple(int sum, int no) { return sum - (sum % no); }
bool checkEndCondition(int multiple, int a, int b, int c) {
  multiple = multiple / 7;
  if (multiple <= a && 2 * multiple <= b && 4 * multiple <= c) {
    return true;
  }
  return false;
}
int answer(int no) {
  no = no / 7;
  return no + 2 * no + 4 * no;
}
int main() {
  int a, b, c;
  int sum;
  int multiple;
  cin >> a >> b >> c;
  sum = (a + b + c);
  multiple = findLessMultiple(sum, 7);
  while (multiple != 0) {
    if (checkEndCondition(multiple, a, b, c)) {
      cout << answer(multiple);
      return 0;
    }
    multiple = multiple - 7;
  }
  cout << 0;
  return 0;
}
