#include <bits/stdc++.h>
using namespace std;
signed main() {
  int a, b, c;
  cin >> a >> b >> c;
  int k = min(a / 3, min(b / 2, c / 2)), mx = 0;
  a -= 3 * k;
  b -= 2 * k;
  c -= 2 * k;
  int arr[7][3];
  memset(arr, 0, sizeof(arr));
  arr[0][0] = 1;
  arr[1][1] = 1;
  arr[2][2] = 1;
  arr[3][0] = 1;
  arr[4][2] = 1;
  arr[5][1] = 1;
  arr[6][0] = 1;
  for (int i = 0; i < 7; i++) {
    int a1 = a, b1 = b, c1 = c;
    for (int j = i, p = 0;; j = (j + 1) % 7, p++) {
      a1 -= arr[j][0];
      b1 -= arr[j][1];
      c1 -= arr[j][2];
      if (a1 < 0 || b1 < 0 || c1 < 0) {
        mx = max(mx, p);
        break;
      }
    }
  }
  cout << mx + 7 * k << endl;
}
