#include <bits/stdc++.h>
using namespace std;
struct week {
  int a, b, c;
} wk[13] = {
    0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1,
    0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1,
};
int main() {
  for (int i = 1; i <= 12; i++) {
    wk[i].a += wk[i - 1].a;
    wk[i].b += wk[i - 1].b;
    wk[i].c += wk[i - 1].c;
  }
  int a, b, c;
  cin >> a >> b >> c;
  int d = min(min(a / 3, b / 2), c / 2);
  int sol = 7 * d;
  a -= 3 * d;
  b -= 2 * d;
  c -= 2 * d;
  int dmax = 0;
  for (int i = 1; i <= 7; i++)
    for (int j = 1; j <= 6; j++) {
      int x, y, z;
      x = wk[i + j - 1].a - wk[i - 1].a;
      y = wk[i + j - 1].b - wk[i - 1].b;
      z = wk[i + j - 1].c - wk[i - 1].c;
      if (a >= x && b >= y && c >= z) dmax = max(dmax, j);
    }
  cout << sol + dmax;
}
