#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int a, b, c;
  cin >> a >> b >> c;
  int ak = a / 3;
  int bk = b / 2;
  int ck = c / 2;
  int kmin = min(ak, min(bk, ck));
  ak -= kmin;
  bk -= kmin;
  ck -= kmin;
  a = a % 3 + ak * 3;
  b = b % 2 + bk * 2;
  c = c % 2 + ck * 2;
  int tk[7] = {1, 1, 2, 3, 1, 3, 2};
  int ans = kmin * 7;
  int ans2 = -1;
  for (int i = 1; i <= 7; i++) {
    int ans2t = 0;
    int aq = a, bq = b, cq = c;
    int j = i;
    while (true) {
      if (tk[j % 7] == 1)
        aq--;
      else if (tk[j % 7] == 2)
        bq--;
      else if (tk[j % 7] == 3)
        cq--;
      if (aq >= 0 && bq >= 0 && cq >= 0) {
        ans2t++;
        j++;
      } else {
        break;
      }
    }
    if (ans2t > ans2) ans2 = ans2t;
  }
  cout << ans + ans2 << "\n";
  return 0;
}
