#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, ans = 0;
  cin >> a >> b >> c;
  long long i, j, k, l;
  i = a / 3;
  j = b / 2;
  k = c / 2;
  l = min(i, j);
  l = min(l, k);
  ans += l * 7;
  a -= l * 3;
  b -= l * 2;
  long long t, max = 0, t1 = 0;
  c -= l * 2;
  long long temp[] = {a, b, c};
  long long temp1[] = {a, b, c};
  long long week[] = {0, 1, 2, 0, 2, 1, 0};
  for (i = 0; i < 7; i++) {
    t1 = 0;
    k = i;
    for (j = 0; j < 7; j++) {
      t = (k % 7);
      if (temp[week[t]] > 0) {
        t1++;
        temp[week[t]]--;
      } else
        break;
      k++;
    }
    temp[0] = temp1[0];
    temp[1] = temp1[1];
    temp[2] = temp1[2];
    if (t1 > max) max = t1;
  }
  ans += max;
  cout << ans << endl;
}
