#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long a, b, c;
  cin >> a >> b >> c;
  long long minimumWeeks = min(a / 3, min(b / 2, c / 2));
  a = a - 3 * minimumWeeks;
  b = b - 2 * minimumWeeks;
  c = c - 2 * minimumWeeks;
  long long tempA = a;
  long long tempB = b;
  long long tempC = c;
  vector<vector<long long>> daysArray;
  vector<long long> days1{1, 2, 3, 4, 5, 6, 7};
  vector<long long> days2{2, 3, 4, 5, 6, 7, 1};
  vector<long long> days3{3, 4, 5, 6, 7, 1, 2};
  vector<long long> days4{4, 5, 6, 7, 1, 2, 3};
  vector<long long> days5{5, 6, 7, 1, 2, 3, 4};
  vector<long long> days6{6, 7, 1, 2, 3, 4, 5};
  vector<long long> days7{7, 1, 2, 3, 4, 5, 6};
  long long maxDays = 0;
  daysArray.push_back(days1);
  daysArray.push_back(days2);
  daysArray.push_back(days3);
  daysArray.push_back(days4);
  daysArray.push_back(days5);
  daysArray.push_back(days6);
  daysArray.push_back(days7);
  for (long long i = 0; i < 7; i++) {
    long long count = 0;
    a = tempA;
    b = tempB;
    c = tempC;
    for (auto day : daysArray[i]) {
      if (day == 1 || day == 2 || day == 5) {
        if (a == 0) break;
        a--;
        count++;
      }
      if (day == 3 || day == 7) {
        if (b == 0) break;
        b--;
        count++;
      }
      if (day == 4 || day == 6) {
        if (c == 0) break;
        c--;
        count++;
      }
    }
    maxDays = max(maxDays, count);
  }
  cout << minimumWeeks * 7 + maxDays << endl;
  return 0;
}
