Gaitonde's Escape

1

1 votes
Medium
Problem

Ganesh Gaitonde is stuck inside a jail. He is planning to escape from it. He has to cross N walls each with varying heights(every height greater than 0). He climbs X feet every time. But due to the slippery nature of those walls, every time he slips back by Y feet. He wants to know the total number of jumps required to cross all walls and escape from the jail.

INPUT FORMAT

The first line contains 3 space separated integers X, Y, N.

The second line contains N space-separated values denoting the heights of walls.

OUTPUT FORMAT

Print a single integer denoting the number of jumps required to escape from the jail.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?