Birthday Candle Counting Problem