#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
const int maxn = 2 * 1e5;
const int maxk = 100;
int a, b, c, d, e, n, m, k;
int ans, current_ans;
bool diet_a[] = {0, 1, 0, 0, 1, 0, 0, 1};
bool diet_b[] = {0, 0, 1, 0, 0, 0, 1, 0};
bool diet_c[] = {0, 0, 0, 1, 0, 1, 0, 0};
void symuluj(int day) {
  int a2 = a, b2 = b, c2 = c;
  current_ans = 0;
  for (int i = day; i <= 7; i++) {
    if (diet_a[i]) a2--;
    if (diet_b[i]) b2--;
    if (diet_c[i]) c2--;
    if (a2 >= 0 && b2 >= 0 && c2 >= 0) current_ans++;
  }
  int weeks = a2 / 3;
  weeks = min(weeks, b2 / 2);
  weeks = min(weeks, c2 / 2);
  a2 -= weeks * 3;
  b2 -= weeks * 2;
  c2 -= weeks * 2;
  current_ans += 7 * weeks;
  for (int i = 1; i <= 7; i++) {
    if (diet_a[i]) a2--;
    if (diet_b[i]) b2--;
    if (diet_c[i]) c2--;
    if (a2 >= 0 && b2 >= 0 && c2 >= 0) current_ans++;
  }
  ans = max(ans, current_ans);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> a >> b >> c;
  for (int i = 1; i <= 7; i++) symuluj(i);
  cout << ans;
  return 0;
}
