#include <bits/stdc++.h>
using namespace std;
int maxn;
int temp;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int minn = min(a / 3, min(b / 2, c / 2));
  if (minn == 0) {
    for (int i = 1; i <= 7; i++) {
      temp = 0;
      int a1 = a, b1 = b, c1 = c;
      for (int j = i;; j++) {
        if (j == 8) j = 1;
        if ((j == 1 || j == 4 || j == 7) && a1 == 0) break;
        if ((j == 1 || j == 4 || j == 7) && a1) {
          a1--;
          temp++;
        }
        if ((j == 2 || j == 6) && b1 == 0) break;
        if ((j == 2 || j == 6) && b1) {
          b1--;
          temp++;
        }
        if ((j == 3 || j == 5) && c1 == 0) break;
        if ((j == 3 || j == 5) && c1) {
          c1--;
          temp++;
        }
      }
      maxn = max(maxn, temp);
    }
    cout << maxn;
  } else {
    int week = minn * 7;
    a -= minn * 3;
    b -= minn * 2;
    c -= minn * 2;
    for (int i = 1; i <= 7; i++) {
      temp = week;
      int a1 = a, b1 = b, c1 = c;
      for (int j = i;; j++) {
        if (j == 8) j = 1;
        if ((j == 1 || j == 4 || j == 7) && a1 == 0) break;
        if ((j == 1 || j == 4 || j == 7) && a1) {
          a1--;
          temp++;
        }
        if ((j == 2 || j == 6) && b1 == 0) break;
        if ((j == 2 || j == 6) && b1) {
          b1--;
          temp++;
        }
        if ((j == 3 || j == 5) && c1 == 0) break;
        if ((j == 3 || j == 5) && c1) {
          c1--;
          temp++;
        }
      }
      maxn = max(maxn, temp);
    }
    cout << maxn;
  }
  return 0;
}
