#include <bits/stdc++.h>
using namespace std;
long a, b, c, ans;
int main() {
  cin >> a >> b >> c;
  ans = min(a / 3, min(b / 2, c / 2));
  a -= 3 * ans;
  b -= 2 * ans;
  c -= 2 * ans;
  long sum = 0;
  for (long j = 1; j <= 7; j++) {
    long i;
    i = j;
    long cnt = 0;
    long a2 = a;
    long b2 = b;
    long c2 = c;
    while (1) {
      if (i == 1 || i == 4 || i == 7) {
        a2--;
      }
      if (i == 2 || i == 6) {
        b2--;
      }
      if (i == 3 || i == 5) {
        c2--;
      }
      if ((c2 >= 0) && (b2 >= 0) && (a2 >= 0))
        cnt++;
      else
        break;
      i++;
      i %= 7;
      if (i == 0) i = 7;
    }
    sum = max(sum, cnt);
  }
  cout << (ans * 7) + sum << endl;
  return 0;
}
