#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long n, m;
int wee[8] = {1, 2, 3, 1, 3, 2, 1};
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long mina = a / 3;
  long long minb = b / 2;
  long long minc = c / 2;
  long long minv = min(mina, min(minb, minc));
  long long ans = 7 * minv;
  a -= minv * 3;
  b -= minv * 2;
  c -= minv * 2;
  long long sum = 0;
  for (int i = 0; i <= 6; i++) {
    long long aa = a, bb = b, cc = c;
    long long s = 0;
    bool flag = 1;
    int j = i;
    while (flag) {
      if (wee[j % 7] == 1) {
        aa--;
        if (aa < 0) {
          flag = 0;
        } else
          s++;
      } else if (wee[j % 7] == 2) {
        bb--;
        if (bb < 0) {
          flag = 0;
        } else
          s++;
      } else if (wee[j % 7] == 3) {
        cc--;
        if (cc < 0) {
          flag = 0;
        } else
          s++;
      }
      j++;
    }
    sum = max(sum, s);
  }
  cout << ans + sum << endl;
  return 0;
}
