#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 10, MOD = 998244353;
const int OO = 1e6;
long long a, b, c;
long long val = -OO;
bool can(long long number, long long day) {
  val = -OO;
  long long weeks = number / 7;
  long long days = number % 7;
  long long aa = a, bb = b, cc = c;
  aa -= 3 * weeks;
  bb -= 2 * weeks;
  cc -= 2 * weeks;
  int k = 0;
  for (int i = day;; i++) {
    if (k == days) break;
    if (i == 8) i = 1;
    if (i == 2 || i == 3 || i == 6)
      aa--;
    else if (i == 1 || i == 4)
      bb--;
    else
      cc--;
    k++;
  }
  return cc >= 0 && aa >= 0 && bb >= 0;
}
int main() {
  long long ans = 0;
  cin >> a >> b >> c;
  for (int i = 1; i <= 7; ++i) {
    long long left = 0, right = 2e13;
    while (left <= right) {
      long long mid = (left + right) / 2;
      if (can(mid, i)) {
        left = mid + 1;
        ans = max(ans, mid);
      } else {
        right = mid - 1;
      }
    }
  }
  cout << ans << endl;
}
