#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1e5;
int arr[7];
long long int d(long long int k, long long int a, long long int b,
                long long int c) {
  long long int i = k;
  long long int ans = 0;
  do {
    if (arr[i] == 1 && a) {
      a--;
      ans++;
    } else if (arr[i] == 2 && b) {
      b--;
      ans++;
    } else if (arr[i] == 3 && c) {
      c--;
      ans++;
    } else {
      return ans;
    }
    i++;
    i %= 7;
  } while (i != k);
}
int main() {
  long long int a, b, c;
  cin >> a >> b >> c;
  arr[0] = 1;
  arr[1] = 2;
  arr[2] = 3;
  arr[3] = 1;
  arr[4] = 3;
  arr[5] = 2;
  arr[6] = 1;
  long long int ans = min(a / 3, min(b / 2, c / 2));
  a -= (ans * 3);
  b -= (ans * 2);
  c -= (ans * 2);
  ans *= 7;
  long long int mx = 0;
  for (int i = 0; i < 7; ++i) {
    mx = max(d(i, a, b, c), mx);
  }
  cout << ans + mx;
  return 0;
}
