#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1;
  long long arr[7] = {1, 2, 3, 1, 3, 2, 1};
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    long long full = min({a / 3, b / 2, c / 2});
    a -= 3 * full;
    b -= 2 * full;
    c -= 2 * full;
    long long extra = 0;
    long long i = 0;
    while (i < 7) {
      long long a1 = a, b1 = b, c1 = c;
      long long sta = i;
      long long cue = 0;
      while (1) {
        if (arr[sta] == 1 && a1 == 0) break;
        if (arr[sta] == 2 && b1 == 0) break;
        if (arr[sta] == 3 && c1 == 0) break;
        if (arr[sta] == 1) a1--;
        if (arr[sta] == 2) b1--;
        if (arr[sta] == 3) c1--;
        cue++;
        sta++;
        if (sta == 7) sta = 0;
      }
      if (extra < cue) extra = cue;
      i++;
    }
    cout << 7 * full + extra << endl;
  }
}
