#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c, d, ma, cnt, mi;
  cnt = 0;
  int ar[150];
  int ans = 0;
  memset(ar, 0, sizeof(ar));
  scanf("%d %d %d", &a, &b, &c);
  int a1 = a / 3;
  int b1 = b / 2;
  int c1 = c / 2;
  int o = min(min(a1, b1), c1);
  ans += 7 * o;
  a = a - o * 3;
  b = b - o * 2;
  c = c - o * 2;
  int g = ans;
  int ai = a;
  int bi = b;
  int ci = c;
  for (int j = 0; j <= 6; j++) {
    a = ai;
    b = bi;
    c = ci;
    int ans1 = g;
    for (int i = 1; i <= 7; i++) {
      int k = (i + j) % 7;
      if (k == 1 || k == 4 || k == 0) {
        if (a <= 0) {
          break;
        } else {
          a--;
          ans1++;
        }
      } else if (k == 2 || k == 6) {
        if (b <= 0) {
          break;
        } else {
          b--;
          ans1++;
        }
      } else if (k == 3 || k == 5) {
        if (c <= 0) {
          break;
        } else {
          c--;
          ans1++;
        }
      }
    }
    ans = max(ans, ans1);
  }
  printf("%d\n", ans);
  return 0;
}
