#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
int n, t, ans = 99999999, mark;
char s[maxn];
int a, b, c;
const int dis[7] = {1, 2, 3, 1, 3, 2, 1};
int main() {
  cin >> a >> b >> c;
  int aa = a / 3, bb = b / 2, cc = c / 2;
  int m = 999999999;
  m = min(bb, aa);
  m = min(m, cc);
  int ans = m * 7;
  int ra = a - 3 * m, rb = b - 2 * m, rc = c - 2 * m;
  int cnt = 0;
  for (int i = 0; i < 7; i++) {
    int t = 0;
    int ta = ra, tb = rb, tc = rc;
    for (int j = i; j < i + 7; j++) {
      int temp = j;
      if (temp >= 7) temp = temp - 7;
      if (dis[temp] == 1) {
        if (ta == 0) break;
        t++;
        ta--;
      } else if (dis[temp] == 2) {
        if (tb == 0) break;
        t++;
        tb--;
      } else if (dis[temp] == 3) {
        if (tc == 0) break;
        t++;
        tc--;
      }
    }
    cnt = max(t, cnt);
  }
  ans += cnt;
  cout << ans << endl;
  return 0;
}
