Writing hardcore Flag Counter

Writing hardcore