#include <bits/stdc++.h>
using namespace std;
template <typename T>
void pr_vector(vector<T> a) {
  for (auto i : a) {
    cout << i << " ";
  }
  cout << '\n';
}
template <typename T>
void pr_array(vector<T> a, int n) {
  for (int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << '\n';
}
template <typename T>
void pr_matrix(vector<vector<T> > a) {
  for (auto i : a) {
    for (auto j : i) {
      cout << j << " ";
    }
    cout << '\n';
  }
}
template <typename T>
ostream& operator<<(ostream& ofs, pair<T, T> p) {
  ofs << "(" << p.first << "; " << p.second << ") ";
}
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcountll(s);
}
int a, b, c;
char s[] = {'a', 'b', 'c', 'a', 'c', 'b', 'a'};
void Input() { cin >> a >> b >> c; }
long long evaluate(int j, int a, int b, int c, int res) {
  long long ans = res;
  for (int k = j; k < (j + 7); k++) {
    int i = k % 7;
    if (s[i] == 'a')
      if (a > 0) {
        a--;
        ans++;
      } else {
        break;
      }
    else if (s[i] == 'b') {
      if (b > 0) {
        b--;
        ans++;
      } else {
        break;
      }
    } else {
      if (c > 0) {
        ans++;
        c--;
      } else {
        break;
      }
    }
  }
  return ans;
}
void Solve() {
  long long res = min(a / 3, min(b / 2, c / 2));
  a -= res * 3;
  b -= res * 2;
  c -= res * 2;
  res *= 7;
  long long result = 0;
  for (int j = 0; j < 7; j++) {
    result = max(result, evaluate(j, a, b, c, res));
  }
  cout << result << '\n';
}
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  Input();
  Solve();
  return 0;
}
