#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int t = 0x7fffffff;
  t = min(t, a / 3);
  t = min(t, b / 2);
  t = min(t, c / 2);
  a -= t * 3;
  b -= t * 2;
  c -= t * 2;
  int ans = 0;
  int maxn = 0;
  for (int i = 0; i < 7; i++) {
    int arr[3] = {a, b, c};
    int j = 0;
    bool flag = true;
    for (; j < 7 && flag; j++) {
      switch ((j + i) % 7) {
        case 0:
          if (arr[0])
            arr[0]--;
          else
            flag = false;
          break;
        case 1:
          if (arr[0])
            arr[0]--;
          else
            flag = false;
          break;
        case 2:
          if (arr[1])
            arr[1]--;
          else
            flag = false;
          break;
        case 3:
          if (arr[2])
            arr[2]--;
          else
            flag = false;
          break;
        case 4:
          if (arr[0])
            arr[0]--;
          else
            flag = false;
          break;
        case 5:
          if (arr[2])
            arr[2]--;
          else
            flag = false;
          break;
        case 6:
          if (arr[1])
            arr[1]--;
          else
            flag = false;
          break;
      }
    }
    if (j > maxn) {
      maxn = j;
    }
  }
  printf("%d\n", maxn - 1 + t * 7);
  return 0;
}
