#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int a, b, c;
  cin >> a >> b >> c;
  long long int days = 0;
  long long int ca = a / 3;
  long long int cb = b / 2;
  long long int cc = c / 2;
  long long int hell = min({ca, cb, cc}) * 7;
  days = days + min({ca, cb, cc}) * 7;
  a = a - min({ca, cb, cc}) * 3;
  b = b - min({ca, cb, cc}) * 2;
  c = c - min({ca, cb, cc}) * 2;
  for (int i = 0; i < 7; i++) {
    long long int dd[7] = {0, 1, 2, 0, 2, 1, 0};
    long long int tmp[3] = {a, b, c};
    int more = 0;
    for (int j = 0; j < 7; j++) {
      if (tmp[dd[(i + j) % 7]] == 0) break;
      tmp[dd[(i + j) % 7]]--;
      more++;
    }
    days = max(days, hell + more);
  }
  cout << days << endl;
  return 0;
}
