#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
std::ostream &operator<<(std::ostream &os, std::vector<T> &a) {
  os << "{";
  for (size_t i = 0; i < a.size(); ++i) os << (i > 0 ? "," : "") << a[i];
  return os << "}";
}
[[maybe_unused]] constexpr ll MOD = 1e9 + 7;
[[maybe_unused]] constexpr int INF = 0x3f3f3f3f;
[[maybe_unused]] constexpr ll INFL = 0x3f3f3f3f3f3f3f3fLL;
int u[7]{0, 1, 2, 0, 2, 1, 0};
int main() {
  ll a[3];
  cin >> a[0] >> a[1] >> a[2];
  ll mn = a[0] / 3;
  mn = min(mn, a[1] / 2);
  mn = min(mn, a[2] / 2);
  ll ans = mn * 7;
  a[0] -= 3 * mn;
  a[1] -= 2 * mn;
  a[2] -= 2 * mn;
  ll fin_ans = ans;
  for (int x = 0; x < (7); ++x) {
    bool fin = false;
    ll tmp = ans;
    ll b[3];
    for (int i = 0; i < (3); ++i) b[i] = a[i];
    while (true) {
      for (int i = 0; i < (7); ++i) {
        if (b[u[(i + x) % 7]] == 0) {
          fin = true;
          break;
        }
        --b[u[(i + x) % 7]];
        ++tmp;
      }
      if (fin) break;
    }
    fin_ans = max(fin_ans, tmp);
  }
  cout << fin_ans << '\n';
  return 0;
}
