#include <bits/stdc++.h>
using namespace std;
const int inf = 5e4;
long long a, b, c;
long long ans;
long long v[7] = {0, 1, 2, 0, 2, 1, 0};
long long getmx(int s) {
  long long have[5];
  have[0] = a, have[1] = b, have[2] = c;
  long long ret = 0;
  while (1) {
    if (have[v[s]] == 0) break;
    have[v[s]]--;
    ret++;
    s = (s + 1) % 7;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ans = 0;
  cin >> a >> b >> c;
  while (a >= 3 && b >= 2 && c >= 2) {
    ans += 7;
    a -= 3, b -= 2, c -= 2;
  }
  long long res = 0;
  for (int i = 0; i < 7; i++) {
    res = max(res, getmx(i));
  }
  cout << ans + res << "\n";
  return 0;
}
