Solve "Weekend Counter" problem.