#include <bits/stdc++.h>
using std::abs;
using std::cerr;
using std::cin;
using std::cout;
using std::function;
using std::lower_bound;
using std::map;
using std::max;
using std::min;
using std::pair;
using std::reverse;
using std::set;
using std::sort;
using std::string;
using std::to_string;
using std::vector;
using ll = long long;
using PI = pair<int, int>;
template <class T>
using V = vector<T>;
using VI = V<int>;
int MOD = (int)1e9 + 7;
inline void debug(VI &as) {}
inline void debug(const string &s) {}
template <typename... Args>
inline void debug(const char *format, Args const &...args) {}
template <class T, class Func>
inline void debug(const V<T> &as, Func f) {}
template <typename... Args>
string format(const std::string &fmt, Args... args) {
  size_t len = std::snprintf(nullptr, 0, fmt.c_str(), args...);
  std::vector<char> buf(len + 1);
  std::snprintf(&buf[0], len + 1, fmt.c_str(), args...);
  return std::string(&buf[0], &buf[0] + len);
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int A, B, C;
  cin >> A >> B >> C;
  int w = min(A / 3, min(B / 2, C / 2));
  A -= w * 3;
  B -= w * 2;
  C -= w * 2;
  debug("%d %d %d", A, B, C);
  int best = 0;
  string r = "01202100120210";
  for (int i = 0; i < 7; ++i) {
    int j = i;
    VI remain = {A, B, C};
    while (remain[r[j] - '0'] > 0) {
      remain[r[j++] - '0']--;
      debug("%d %d", i, j);
      debug(remain);
    }
    debug("days i:%d j:%d", i, j);
    best = max(best, j - i);
  }
  cout << w * 7 + best << '\n';
  return 0;
}
