count of maximum problem first solution