#include <bits/stdc++.h>
using namespace std;
int a, b, c, ta, tb, tc;
int et[8] = {1, 1, 2, 3, 1, 3, 2, 1};
int work(int st) {
  int ret = 0;
  ta = a, tb = b, tc = c;
  for (int i = st; i <= 7; i++) {
    if (et[i] == 1) {
      if (ta > 0) {
        ret++;
        ta--;
      } else {
        return ret;
      }
    } else if (et[i] == 2) {
      if (tb > 0) {
        ret++;
        tb--;
      } else {
        return ret;
      }
    } else {
      if (tc > 0) {
        ret++;
        tc--;
      } else {
        return ret;
      }
    }
  }
  int cnt = min(min(ta / 3, tb / 2), tc / 2);
  ret += cnt * 7;
  ta -= 3 * cnt, tb -= 2 * cnt, tc -= 2 * cnt;
  for (int i = 1; i <= 7; i++) {
    if (et[i] == 1) {
      if (ta > 0) {
        ret++;
        ta--;
      } else {
        return ret;
      }
    } else if (et[i] == 2) {
      if (tb > 0) {
        ret++;
        tb--;
      } else {
        return ret;
      }
    } else {
      if (tc > 0) {
        ret++;
        tc--;
      } else {
        return ret;
      }
    }
  }
}
int main() {
  int ans = -1;
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 1; i <= 7; i++) {
    ans = max(ans, work(i));
  }
  printf("%d\n", ans);
}
