Time limit
2s
Memory limit
128 MB
A band is preparing a new album with N songs of equal length. Each song is L seconds long, and one CD can store at most C seconds of audio.
If two or more songs are placed on the same CD, there must be a 1-second pause between each pair of consecutive songs. Therefore, putting x songs on one CD requires x * L + (x - 1) seconds.
Because of a superstition, no CD may contain a number of songs that is divisible by 13. Determine the minimum number of CDs needed to include all N songs.
The first line contains the number of songs N. N is a natural number no greater than 100,000.
The second line contains the length L of each song in seconds.
The third line contains the capacity C of one CD in seconds. C is a natural number no greater than 10,000, and L is a natural number no greater than C.
Print the minimum number of CDs needed to store all songs.
In the first public test, at most two songs can fit on one CD.