One day, a donkey belonging to the desert went to the football stadium and because he was a donkey, he went into the field instead of the stands. Then he became excited when he saw the grass and seeing thousands of people around him made him doubly excited; He got the feeling of the concert and decided to sing for them! He didn't know anything about music and rhythm, but in order for his juniper to be rhythmic, he decided to leave a certain distance between his juniper. So he chose one number a and one number b and decided to read like this:
At 0 second, he announces to the people that he is going to sing a requested song for them. Then it waits for a second and in a second it starts the first juniper. Then he waits for b seconds and in second a+b he starts the second juniper. Then it waits again for a second and it beeps in 2 x a+b seconds. Then waits for b seconds and...
From the beginning, he had made a deal with himself not to sneeze more than l times. (His larynx can't take more than that) Now he has sung l times and it is a question for him how many seconds passed from the time he announced to the people that he was going to sing for them until now when he sang the last song. He is a donkey and he wants you to answer his question.
a,b,l
print the last time to heehaw .