#include <bits/stdc++.h>
using namespace std;
long long cun1;
long long cun[10];
long long k1, k2, k3;
long long cnt;
long long a, b, c, aa, bb, cc;
long long ans;
long long mx = -1;
int main(void) {
  cin >> a >> b >> c;
  if (a >= 3 && b >= 2 && c >= 2) {
    k1 = a / 3;
    k2 = b / 2;
    k3 = c / 2;
    cun[1] = k1;
    cun[2] = k2;
    cun[3] = k3;
    sort(cun + 1, cun + 1 + 3);
    cun1 = cun[1];
    for (int i = 1; i <= 7; i++) {
      cnt = i;
      ans = cun1 * 7;
      aa = a - 3 * cun1;
      bb = b - 2 * cun1;
      cc = c - 2 * cun1;
      while (1) {
        if ((cnt % 7) == 1 || (cnt % 7) == 0 || (cnt % 7) == 4) {
          if (aa != 0)
            aa--;
          else {
            break;
          }
        } else if ((cnt % 7) == 2 || (cnt % 7) == 6) {
          if (bb != 0)
            bb--;
          else
            break;
        } else {
          if (cc != 0)
            cc--;
          else
            break;
        }
        cnt++;
        ans++;
      }
      mx = max(ans, mx);
    }
  } else {
    for (int i = 1; i <= 7; i++) {
      cnt = i;
      ans = 0;
      aa = a;
      bb = b;
      cc = c;
      while (1) {
        if ((cnt % 7) == 1 || (cnt % 7) == 0 || (cnt % 7) == 4) {
          if (aa != 0)
            aa--;
          else {
            break;
          }
        } else if ((cnt % 7) == 2 || (cnt % 7) == 6) {
          if (bb != 0)
            bb--;
          else
            break;
        } else {
          if (cc != 0)
            cc--;
          else
            break;
        }
        cnt++;
        ans++;
      }
      mx = max(ans, mx);
    }
  }
  cout << mx << endl;
  return 0;
}
