#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  long long int i, j;
  long long int key, mytempvar, tmpflag, mytmp1, temp2;
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int a1, b1, c1;
  int arr[8] = {0, 1, 2, 3, 1, 3, 2, 1};
  key = 0;
  tmpflag = 0;
  mytempvar = 3 * b;
  mytempvar /= 2;
  if (b == c && mytempvar == a) {
    cout << (a + b + c) << endl;
    return 0;
  }
  int p1, p2, p3;
  mytmp1 = min(a / 3, min(b / 2, c / 2));
  a -= mytmp1 * 3;
  b -= mytmp1 * 2;
  c -= mytmp1 * 2;
  mytempvar = (a + b + c);
  for (i = 1; i <= 7; i++) {
    a1 = a;
    b1 = b;
    c1 = c;
    j = i;
    key = 0;
    while (a1 >= 0 && b1 >= 0 && c1 >= 0) {
      key++;
      if (j == 1 || j == 4 || j == 7)
        a1--;
      else if (j == 2 || j == 6)
        b1--;
      else if (j == 3 || j == 5)
        c1--;
      j++;
      j = j % 7;
      if (j == 0) j = 7;
    }
    key -= 1;
    if (key == mytempvar) {
      cout << (mytmp1 * 7 + mytempvar) << endl;
      return 0;
    }
    if (key > tmpflag) tmpflag = key;
  }
  cout << (mytmp1 * 7 + tmpflag) << endl;
  return 0;
}
