CRYPTO2 - The Bytelandian Cryptographer (Act II)

Encouraged by his last successful exploit, the Bytelandian fanatic cryptographer impudently encrypted a three-digit number by subtracting 1 from it.

This time he has really overstepped the mark! Soldier, go and beat him, for Burger King & Country! Oh, and remember your good manners, use Brainf**k (no other language is allowed).

Input

An encrypted 3-digit positive integer.

Output

The decrypted value.

Example

Input:
699

Output:

700

Added by:adrian
Date:2004-05-28
Time limit:0.200s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:BF
Resource:Sometimes the simplest language is the most pleasing.

hide comments
2020-03-29 08:45:47
what is brainfuck is it a language
2019-06-08 21:40:58
this is not so hard
i got accept first try and use less than 200 character long
2017-04-27 20:07:00
Only special cases are when
1) Last digit is 9
2) Middle digit is 9
2017-02-20 13:03:44
Handling 3 digit inputs with 3 digit outputs is sufficient.
2016-06-02 07:06:26
999 is not a valid input.
2015-06-20 23:51:24
Values are given in a '000' to '999'
Outputs must be from '001 to '1000'
Do not get rid of zeroes at the start of forget about 1000
2015-06-08 17:40:59 Akhilesh Anandh
Has there been any rejudge recently? I see that my solution that was accepted (about 2 years back) is marked "Wrong Answer" now...
2015-01-02 01:03:59 AlB80
I suppose the cell size is bigger than byte.
2012-01-31 18:29:04 Sandeep Singh Jakhar
Too easy :P
2011-06-19 20:23:38 Jared Deckard
1000 is not a 3 digit number, so no "999". If the input could be "99" my code would fail, but I got AC :P

Supporting "000".."998" will satisfy.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.