#include <bits/stdc++.h>
using namespace std;
const int64_t INF = 1e9 + 7;
const int64_t N = 1e5 + 4;
void input() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  ios_base::sync_with_stdio(0);
}
int32_t main() {
  int64_t k, r, o;
  cin >> k >> r >> o;
  int64_t ans = 0;
  int64_t f = min(k / 3, min(r / 2, o / 2));
  k -= f * 3;
  r -= f * 2;
  o -= f * 2;
  ans += f * 7;
  char ar[13] = {'k', 'r', 'o', 'k', 'o', 'r', 'k',
                 'k', 'r', 'o', 'k', 'o', 'r'};
  int64_t prom = 0;
  map<char, int64_t> m;
  for (int64_t i = 0; i < 7; i++) {
    m['k'] = k;
    m['r'] = r;
    m['o'] = o;
    int64_t cur = i;
    int64_t cnt = 0;
    while (true) {
      if (m[ar[cur]] <= 0) {
        break;
      }
      m[ar[cur]] -= 1;
      cur++;
      cnt++;
    }
    prom = max(prom, cnt);
  }
  cout << ans + prom;
}
