#include <bits/stdc++.h>
using namespace std;
int a, b, c;
vector<int> vec = {0, 0, 1, 2, 0, 2, 1, 0, 0, 1, 2, 0, 2, 1};
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> a >> b >> c;
  int ans = min(a / 3, min(b, c) >> 1);
  a -= ans * 3;
  b -= ans << 1;
  c -= ans << 1;
  ans *= 7;
  int maxi = 0;
  for (int i = 0; i < 7; i++) {
    int cnt[] = {a, b, c};
    int res = 0;
    for (int j = i;; j++) {
      if (cnt[vec[j]] == 0) break;
      res++;
      cnt[vec[j]]--;
    }
    maxi = max(maxi, res);
  }
  cout << ans + maxi;
  return 0;
}
