height = 5
up = 2
down = 1
total = 0
day = 0

while total < height:
    day += 1
    total += up
    if total >= height:
        break
    total -= down

print(day)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: