Trace the Boredom solution on input [1,2,1,3,2,2,2,2,3]. First, count frequencies: 1 appears twice, 2 appears five times, 3 appears twice. The values are count[1]×1=2, count[2]×2=10, count[3]×3=6. Now apply House Robber on values [2,10,6]. Compute dp[1], dp[2], dp[3]. What's the final answer?
Answer: dp[1]=2, dp[2]=max(2,10)=10, dp[3]=max(10,2+6)=10. The answer is 10. Take all the 2s.