#include <bits/stdc++.h>
using namespace std;
int a[100], b[100];
int d[] = {0, 1, 2, 3, 1, 3, 2, 1};
long long sol(int x) {
  long long ans = 0;
  b[1] = a[1], b[2] = a[2], b[3] = a[3];
  for (int i = x; i <= 7; i++) {
    b[d[i]]--;
    if (b[d[i]] < 0) return ans;
    ans++;
  }
  x = min(b[1] / 3, min(b[2] / 2, b[3] / 2));
  ans += x * 7;
  b[1] -= 3 * x;
  b[2] -= 2 * x;
  b[3] -= 2 * x;
  for (int i = 1; i <= 7; i++) {
    b[d[i]]--;
    if (b[d[i]] < 0) return ans;
    ans++;
  }
}
int main() {
  long long ans = 0;
  scanf("%d%d%d", &a[1], &a[2], &a[3]);
  for (int i = 1; i <= 7; i++) ans = max(ans, sol(i));
  printf("%lld", ans);
  return 0;
}
