Intel Corporation interview question

mod 5 counter