#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
constexpr int n = 3;
vi a(n);
vi idx = {0, 1, 2, 0, 2, 1, 0};
void input() {
  for (auto&& i : a) cin >> i;
}
int f(int start) {
  int ans = 0;
  auto b = a;
  if (start > 0) {
    while (start < 7 && b[idx[start]]) {
      b[idx[start]]--;
      ++start;
      ++ans;
    }
  }
  start = 0;
  int cnt = min({b[0] / 3, b[1] / 2, b[2] / 2});
  b[0] -= cnt * 3;
  b[1] -= cnt * 2;
  b[2] -= cnt * 2;
  ans += 7 * cnt;
  while (start < 7 && b[idx[start]]) {
    b[idx[start]]--;
    ++start;
    ++ans;
  }
  return ans;
}
void solve() {
  int ans = -1e9;
  for (int i = 0; i < 7; ++i) ans = max(ans, f(i));
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(16);
  cout << fixed;
  int _times = 1;
  while (_times--) {
    input();
    solve();
  }
}
