#include <bits/stdc++.h>
using namespace std;
int a, b, c, k, ans;
int main() {
  cin >> a >> b >> c;
  k = min(min(a / 3, b / 2), c / 2);
  a -= 3 * k, b -= 2 * k, c -= 2 * k;
  ans = 7 * k;
  a = min(a, 3), b = min(b, 2), c = min(c, 2);
  if ((b == 0) || (c == 0)) a = min(a, 2);
  if ((a < 2) && (c < 2)) b = min(b, 1);
  if (a == 0) b = min(b, 1), c = min(c, 1);
  ans += (a + b + c);
  if (b == 0) {
    ans -= (b + c);
    if (a > 0) ans = max(ans, ans - a + 1 + c);
  }
  cout << ans << endl;
}
