#include <bits/stdc++.h>
using namespace std;
int minn(int x, int y, int z) {
  if (x <= y)
    if (x <= z)
      return x;
    else
      return z;
  else if (y >= z)
    return z;
  else
    return y;
}
int maxn(int x, int y, int z) { return max(x, max(y, z)); }
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  int ans = minn(a / 3, b / 2, c / 2);
  a = a - ans * 3, b = b - ans * 2, c = c - ans * 2;
  int x = a, y = b, z = c;
  int d;
  for (d = 1; d <= 7; d++) {
    switch (d % 7) {
      case 1:
      case 4:
      case 0:
        a--;
        break;
      case 2:
      case 6:
        b--;
        break;
      default:
        c--;
        break;
    }
    if (a < 0 || c < 0 || b < 0) break;
  }
  int d1 = d - 1;
  a = x, b = y, c = z;
  for (d = 2; d <= 8; d++) {
    switch (d % 7) {
      case 1:
      case 4:
      case 0:
        a--;
        break;
      case 2:
      case 6:
        b--;
        break;
      default:
        c--;
        break;
    }
    if (a < 0 || c < 0 || b < 0) break;
  }
  int d2 = d - 2;
  a = x, b = y, c = z;
  for (d = 3; d <= 9; d++) {
    switch (d % 7) {
      case 1:
      case 4:
      case 0:
        a--;
        break;
      case 2:
      case 6:
        b--;
        break;
      default:
        c--;
        break;
    }
    if (a < 0 || c < 0 || b < 0) break;
  }
  int d3 = d - 3;
  a = x, b = y, c = z;
  for (d = 4; d <= 10; d++) {
    switch (d % 7) {
      case 1:
      case 4:
      case 0:
        a--;
        break;
      case 2:
      case 6:
        b--;
        break;
      default:
        c--;
        break;
    }
    if (a < 0 || c < 0 || b < 0) break;
  }
  int d4 = d - 4;
  a = x, b = y, c = z;
  for (d = 5; d <= 11; d++) {
    switch (d % 7) {
      case 1:
      case 4:
      case 0:
        a--;
        break;
      case 2:
      case 6:
        b--;
        break;
      default:
        c--;
        break;
    }
    if (a < 0 || c < 0 || b < 0) break;
  }
  int d5 = d - 5;
  a = x, b = y, c = z;
  for (d = 6; d <= 12; d++) {
    switch (d % 7) {
      case 1:
      case 4:
      case 0:
        a--;
        break;
      case 2:
      case 6:
        b--;
        break;
      default:
        c--;
        break;
    }
    if (a < 0 || c < 0 || b < 0) break;
  }
  int d6 = d - 6;
  a = x, b = y, c = z;
  for (d = 7; d <= 13; d++) {
    switch (d % 7) {
      case 1:
      case 4:
      case 0:
        a--;
        break;
      case 2:
      case 6:
        b--;
        break;
      default:
        c--;
        break;
    }
    if (a < 0 || c < 0 || b < 0) break;
  }
  int d7 = d - 7;
  a = x, b = y, c = z;
  d = maxn(maxn(d1, d2, d3), maxn(d4, d5, d6), d7);
  printf("%d\n", ans * 7 + d);
  return 0;
}
