#include <bits/stdc++.h>
using namespace std;
long long int n;
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int cnt = 0;
  while (a >= 3 && b >= 2 && c >= 2) {
    a -= 3;
    b -= 2;
    c -= 2;
    cnt += 7;
  }
  map<long long int, long long int> m;
  m[0] = a;
  m[1] = a;
  m[4] = a;
  m[2] = b;
  m[6] = b;
  m[3] = c;
  m[5] = c;
  long long int cnt2 = 0;
  for (long long i = 0; i < 7; i++) {
    cnt2 = 0;
    for (long long int j = i; m[j % 7] > 0; j++) {
      j %= 7;
      cnt2++;
      if (j == 0 || j == 1 || j == 4) {
        m[0]--;
        m[1]--;
        m[4]--;
      } else if (j == 2 || j == 6) {
        m[2]--;
        m[6]--;
      } else if (j == 3 || j == 5) {
        m[3]--;
        m[5]--;
      }
    }
    v.push_back(cnt2);
    m[0] = a;
    m[1] = a;
    m[4] = a;
    m[2] = b;
    m[6] = b;
    m[3] = c;
    m[5] = c;
  }
  sort(v.begin(), v.end());
  cout << cnt + v[6];
  return 0;
}
