$\+=(4)[$_%3]+(4)[$_%5]||length for glob<>;print