#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  cin >> x;
}
template <typename T, typename T0>
void read(T &x, T0 &y) {
  cin >> x >> y;
}
template <typename T, typename T0, typename T1>
void read(T &x, T0 &y, T1 &z) {
  cin >> x >> y >> z;
}
bool isPowerOfTwo(int x) { return x && (!(x & (x - 1))); }
int digits(int n) {
  int x = floor(log10(n)) + 1;
  return x;
}
long long int fact(long long int n) {
  if (n == 0) return 1;
  return n * fact(n - 1);
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
vector<bool> sieve(1000000, true);
void sieve_er() {
  sieve[0] = false;
  sieve[1] = false;
  for (long long int i = 2; i * i <= 1000000; i++) {
    if (sieve[i] == true) {
      for (long long int j = i * i; j < 1000000; j += i) sieve[j] = false;
    }
  }
}
vector<long long int> vec;
void divisors(long long int n) {
  for (long long int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        vec.push_back(i);
      else {
        vec.push_back(i);
        vec.push_back(n / i);
      }
    }
  }
}
long long int total_divisors(long long int n) {
  long long int c = 0;
  for (long long int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        c = c + 1;
      else
        c = c + 2;
    }
  }
  return c;
}
long long int nCr(long long int n, long long int r) {
  long long int ans = 1;
  for (int i = 0; i < r; i++) {
    ans *= n - i;
    ans /= i + 1;
  }
  return ans;
}
long long int power_m(long long int a, long long int b,
                      long long int m = 1000000007) {
  a %= m;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long int power(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long int strTo(string s) {
  stringstream tmp(s);
  long long int x = 0;
  tmp >> x;
  return x;
}
string NoTo(long long int n) {
  ostringstream str1;
  str1 << n;
  string ans = str1.str();
  return ans;
}
void start() {}
long long int tree[4000001];
long long int a[10000001];
void build(int i, int s, int e) {
  if (s > e) return;
  if (s == e) {
    tree[i] = a[s];
    return;
  }
  int mid = (s + e) / 2;
  build(2 * i, s, mid);
  build(2 * i + 1, mid + 1, e);
  tree[i] = (tree[2 * i] + tree[2 * i + 1]);
  return;
}
void un(int in, int s, int e, int i, int val) {
  if (i < s || i > e) return;
  if (s == e) {
    tree[in] += val;
    return;
  }
  int mid = (s + e) / 2;
  un(2 * in, s, mid, i, val);
  un(2 * in + 1, mid + 1, e, i, val);
  tree[in] = (tree[2 * in] + tree[2 * in + 1]);
  return;
}
long long int query(int in, int s, int e, int qs, int qe) {
  if (qs > e || qe < s) return 0;
  if (s >= qs && e <= qe) return tree[in];
  int mid = (s + e) / 2;
  long long int left = query(2 * in, s, mid, qs, qe);
  long long int right = query(2 * in + 1, mid + 1, e, qs, qe);
  return left + right;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int a, b, c;
  read(a, b, c);
  int ans = 0;
  int z = min(a / 3, min(b / 2, c / 2));
  ans += (7 * z);
  a -= (z * 3);
  b -= (z * 2);
  c -= (z * 2);
  char ar[7] = {'a', 'a', 'b', 'c', 'a', 'c', 'b'};
  int ma = -1;
  for (int i = 0; i < 7; i++) {
    int j = i;
    int a1 = a, b1 = b, c1 = c;
    int x = 0;
    while (true) {
      if (ar[j] == 'a') {
        if (a1 > 0) {
          a1--;
          x++;
        } else
          break;
      }
      if (ar[j] == 'b') {
        if (b1 > 0) {
          b1--;
          x++;
        } else
          break;
      }
      if (ar[j] == 'c') {
        if (c1 > 0) {
          c1--;
          x++;
        } else
          break;
      }
      if (j == 6)
        j = 0;
      else
        j++;
    }
    ma = max(ma, x);
  }
  ans += ma;
  cout << ans << "\n";
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
