All Submissions


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

Input contains several integers, each in a single line.
Input ends with a "-1"
All inputs <= 10^16

OUTPUT

Output one integer for every input, as said above.

EXAMPLE

Input:
2
7
29
-1

Output:
1
7
23

Problem Setter : Sunny Lalwani

Languages: AWK,Bash,Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Python3,Ruby,Text

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0