#include <bits/stdc++.h>
using namespace std;
long long bigmod(long long b, long long p, long long md) {
  if (p == 0) return 1;
  if (p % 2 == 1) {
    return ((b % md) * bigmod(b, p - 1, md)) % md;
  } else {
    long long y = bigmod(b, p / 2, md);
    return (y * y) % md;
  }
}
int main() {
  long long arr[3];
  cin >> arr[0] >> arr[1] >> arr[2];
  long long week = arr[0] / 3;
  week = min(week, arr[1] / 2);
  week = min(week, arr[2] / 2);
  long long ans = week * 7;
  arr[0] = arr[0] - week * 3;
  arr[1] = arr[1] - week * 2;
  arr[2] = arr[2] - week * 2;
  long long day = 0;
  long long tem = 0;
  for (long long i = 1; i <= 7; i++) {
    day = 0;
    long long a = arr[0];
    long long b = arr[1];
    long long c = arr[2];
    for (long long j = i;;) {
      if (j == 2 || j == 3 || j == 6) {
        if (a == 0) {
          break;
        } else {
          a--;
          day++;
        }
      } else if (j == 1 || j == 4) {
        if (b) {
          b--;
          day++;
        } else
          break;
      } else {
        if (c) {
          c--;
          day++;
        } else
          break;
      }
      j++;
      if (j == 8) j = 1;
    }
    tem = max(tem, day);
  }
  cout << ans + tem << endl;
  return 0;
}
