#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long a, b, c, aa, bb, cc;
  cin >> a >> b >> c;
  aa = a / 3;
  bb = b / 2;
  cc = c / 2;
  long long ans = min(aa, min(bb, cc)), mx = 0;
  a -= ans * 3, b -= ans * 2, c -= ans * 2;
  for (long long i = 0; i < 7; i++) {
    long long ta = a, tb = b, tc = c, j;
    for (j = i; j < i + 7; j++) {
      if (j % 7 == 0 || j % 7 == 1 || j % 7 == 4)
        ta--;
      else if (j % 7 == 2 || j % 7 == 6)
        tb--;
      else
        tc--;
      if (ta < 0 || tb < 0 || tc < 0) {
        j--;
        break;
      }
    }
    mx = max(mx, j - i + 1);
  }
  cout << ans * 7 + mx << '\n';
  return 0;
}
