#include <bits/stdc++.h>
long long dic[7] = {1, 2, 3, 1, 3, 2, 1};
using namespace std;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  int d[3];
  d[0] = a / 3;
  d[1] = b / 2;
  d[2] = c / 2;
  sort(d, d + 3);
  a -= d[0] * 3;
  b -= d[0] * 2;
  c -= d[0] * 2;
  if (a == 0 && b == 0 && c == 0) {
    cout << d[0] * 7 << endl;
  } else {
    int maxn = 0;
    for (int i = 1; i <= 7; i++) {
      int x = a, y = b, z = c;
      int j = i;
      int s = 0;
      while (j < 7) {
        if (dic[j] == 1) {
          if (x) {
            x--;
            s++;
          } else
            break;
        } else if (dic[j] == 2) {
          if (y) {
            y--;
            s++;
          } else
            break;
        } else if (dic[j] == 3) {
          if (z) {
            z--;
            s++;
          } else
            break;
        }
        j++;
        j %= 7;
      }
      maxn = max(maxn, s);
    }
    cout << maxn + d[0] * 7 << endl;
  }
  return 0;
}
