#include <bits/stdc++.h>
using namespace std;
int days[7] = {0, 1, 2, 0, 2, 1, 0}, food[3], week[3] = {3, 2, 2};
int main() {
  int full = 0;
  cin >> food[0] >> food[1] >> food[2];
  if (food[0] >= 3 && food[1] >= 2 && food[2] >= 2) {
    int nr_weeks = food[0] / week[0];
    for (int i = 1; i <= 2; i++) {
      nr_weeks = min(nr_weeks, food[i] / week[i]);
    }
    full += 7 * nr_weeks;
    for (int i = 0; i <= 2; i++) {
      food[i] -= nr_weeks * week[i];
    }
  }
  int rez = full;
  for (int i = 0; i < 7; i++) {
    int cnt = 0, day = i;
    int copy_food[3] = {food[0], food[1], food[2]};
    while (copy_food[days[day]]) {
      cnt++;
      copy_food[days[day]]--;
      day++;
      if (day == 7) day = 0;
    }
    rez = max(rez, full + cnt);
  }
  cout << rez;
}
