#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, a, b, c, x, y, z, n, m, t;
  string s, u, v;
  int ara[4];
  cin >> ara[0] >> ara[1] >> ara[2];
  m = min(ara[0] / 3, min(ara[1] / 2, ara[2] / 2));
  ara[0] -= m * 3;
  ara[1] -= m * 2;
  ara[2] -= m * 2;
  ara[0] = min(3, ara[0]);
  ara[1] = min(2, ara[1]);
  ara[2] = min(2, ara[2]);
  int day[] = {0, 0, 1, 2, 0, 2, 1};
  t = 0;
  a = ara[0];
  b = ara[1];
  c = ara[2];
  for (i = 0; i < 7; i++) {
    z = 0;
    for (j = i; j < 7 + i; j++) {
      ara[day[j % 7]]--;
      if (ara[0] < 0 || ara[1] < 0 || ara[2] < 0) break;
      z++;
    }
    t = max(t, z);
    ara[0] = a;
    ara[1] = b;
    ara[2] = c;
  }
  cout << m * 7 + t << endl;
}
