#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int freq[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long a, b, c;
  cin >> a >> b >> c;
  long long arr[7];
  arr[0] = arr[3] = 2;
  arr[1] = arr[2] = arr[5] = 1;
  arr[4] = arr[6] = 3;
  long long temp1 = a / 3, temp2 = b / 2, temp3 = c / 2;
  long long t = min(min(temp1, temp2), temp3);
  long long res = t * (long long)7;
  a -= t * 3;
  b -= t * 2;
  c -= t * 2;
  long long mx = 0;
  for (int i = 0; i < 7; ++i) {
    long long temp = 0;
    int j = i;
    long long A = a, B = b, C = c;
    while (true) {
      if (arr[j] == 1) {
        A--;
        if (A < 0) break;
        temp++;
      } else if (arr[j] == 2) {
        B--;
        if (B < 0) break;
        temp++;
      } else {
        C--;
        if (C < 0) break;
        temp++;
      }
      j++;
      j %= 7;
    }
    mx = max(mx, temp);
  }
  cout << (long long)(res + mx) << endl;
}
