#include <bits/stdc++.h>
using namespace std;
const long long inf = (1LL << 60) - 1;
long long q, t, x, y, n, k, c, c1, l, r, ans;
vector<int> prime;
int vis[100000 + 10];
void solve() {
  vector<long long> a(3);
  cin >> a[0] >> a[1] >> a[2];
  x = min({a[0] / 3, a[1] / 2, a[2] / 2});
  a[0] -= x * 3;
  a[1] -= x * 2;
  a[2] -= x * 2;
  vector<int> idx{0, 1, 2, 0, 2, 1, 0};
  ans = 0;
  for (int i = 0; i < 7; i++) {
    q = i;
    vector<long long> b = a;
    c = 0;
    while (b[idx[q]] > 0) {
      b[idx[q]]--;
      q = (q + 1) % 7;
      c++;
    }
    ans = max(ans, x * 7 + c);
  }
  cout << ans << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
