Lets get to know DOTA better.
Defence of the Ancients (DOTA) is a multiplayer game in which players choose Heroes and fight against each other. The interesting thing about passionate DOTA players is that they tend to fight about DOTA more off the pitch than on it.
One such incident was when I was playing Dazzle and Havok, my friend, was playing Slardar.
He challenges me and says that His hero can kill mine anytime.
I know for a fact that this is not true.
I explained to him that Dazzle's ultimate spell is better than Slardar's.
Slardar ( Slithreen Guard ) Ultimate spell -
Amplify damage : Amplifies physical damage against enemy units by reducing their armor.
Dazzle ( Shadow Priest ) Ultimate spell -
Weave : A powerful shadow magic used to increase or decrease defenses (armor) over time.
But Havok was not convinced. He said that Dazzle's ultimate power changes armor at random.
I dont think it is true.
Here is how the ARMOR changes when a hero is struck with Dazzle's ulti.
Initial -> Final
2 -> 1
4 -> 1
5 -> 5
7 -> 7
29 -> 23
Find the logic and help us understand how the spell works.
Input contains several integers, each in a single line.
Input ends with a "-1"
All inputs <= 10^16
Output one integer for every input, as said above.
Problem Setter : Sunny Lalwani