#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  vector<pair<int, pair<int, int> > > arr;
  arr.push_back(make_pair(1, make_pair(0, 0)));
  arr.push_back(make_pair(0, make_pair(1, 0)));
  arr.push_back(make_pair(0, make_pair(0, 1)));
  arr.push_back(make_pair(1, make_pair(0, 0)));
  arr.push_back(make_pair(0, make_pair(0, 1)));
  arr.push_back(make_pair(0, make_pair(1, 0)));
  arr.push_back(make_pair(1, make_pair(0, 0)));
  int days = 0;
  for (int i = 0; i < 7; i++) {
    int curr_result, t_a = a, t_b = b, t_c = c;
    curr_result = min(a / 3, min(b / 2, c / 2));
    t_a -= 3 * curr_result;
    t_b -= 2 * curr_result;
    t_c -= 2 * curr_result;
    curr_result = curr_result * 7;
    int j = i;
    while (t_a >= 0 && t_b >= 0 && t_c >= 0) {
      t_a -= arr[j].first;
      t_b -= arr[j].second.first;
      t_c -= arr[j].second.second;
      if (t_a < 0 || t_b < 0 || t_c < 0) break;
      curr_result++;
      j++;
      j = j % 7;
    }
    days = max(days, curr_result);
  }
  cout << days << endl;
  return 0;
}
