#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  vector<int> eat({0, 1, 2, 0, 2, 1, 0}), a(3);
  cin >> a[0] >> a[1] >> a[2];
  int weeks = min({a[0] / 3, a[1] / 2, a[2] / 2});
  a[0] -= weeks * 3;
  a[1] -= weeks * 2;
  a[2] -= weeks * 2;
  int add = 0;
  for (int i = 0; i < 7; i++) {
    int add_t = 0;
    int day = i;
    vector<int> temp = a;
    while (temp[eat[day]] != 0) {
      temp[eat[day]]--;
      add_t++;
      day = (day + 1) % 7;
    }
    add = max(add, add_t);
  }
  cout << weeks * 7 + add;
  return 0;
}
