#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
template <typename T>
void vprint(T &V) {
  for (auto v : V) {
    cout << v << " ";
  }
  cout << endl;
}
ll min3(ll a, ll b, ll c) {
  ll m = min(a, b);
  return min(m, c);
}
ll M[7] = {0, 0, 1, 2, 0, 2, 1};
ll how_many_days(vector<ll> A, ll index) {
  ll count = 0;
  for (ll day_of_week = (index); day_of_week < (7); ++day_of_week) {
    ll i = M[day_of_week];
    if (A[i] > 0) {
      A[i]--;
      count++;
    } else {
      return count;
    }
  }
  ll fish_week = A[0] / 3;
  ll rabbit_week = A[1] / 2;
  ll chicken_week = A[2] / 2;
  ll week = min3(fish_week, rabbit_week, chicken_week);
  A[0] -= week * 3;
  A[1] -= week * 2;
  A[2] -= week * 2;
  count += 7 * week;
  for (ll day_of_week = (0); day_of_week < (7); ++day_of_week) {
    ll i = M[day_of_week];
    if (A[i] > 0) {
      A[i]--;
      count++;
    } else {
      return count;
    }
  }
  return count;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  vector<ll> A(3);
  cin >> A[0] >> A[1] >> A[2];
  ll max_len = 0;
  for (ll i = (0); i < (7); ++i) {
    ll len = how_many_days(A, i);
    max_len = max(max_len, len);
  }
  cout << (max_len) << endl;
  return 0;
}
