#include <bits/stdc++.h>
using namespace std;
int Omaior = -1;
void solve(int init, int a, int b, int c) {
  int resp = 0;
  while (c > -1 && b > -1 && a > -1) {
    if (init == 1) {
      a--;
      init++;
      resp++;
    } else if (init == 2) {
      b--;
      init++;
      resp++;
    } else if (init == 3) {
      c--;
      init++;
      resp++;
    } else if (init == 4) {
      a--;
      init++;
      resp++;
    } else if (init == 5) {
      c--;
      init++;
      resp++;
    } else if (init == 6) {
      b--;
      init++;
      resp++;
    } else {
      a--;
      init = 1;
      resp++;
    }
  }
  resp--;
  Omaior = max(Omaior, resp);
}
int main() {
  int a, b, c, semanas;
  scanf("%d %d %d", &a, &b, &c);
  if (a > 5 && b > 5 && c > 5) {
    semanas = min(a / 3, min(b / 2, c / 2));
    a = a - 3 * semanas;
    b = b - 2 * semanas;
    c = c - 2 * semanas;
    for (int i = 1; i <= 7; i++) solve(i, a, b, c);
    cout << Omaior + semanas * 7 << endl;
  } else {
    for (int i = 1; i <= 7; i++) solve(i, a, b, c);
    cout << Omaior << endl;
  }
}
