Problem N
Crypto Trouble
Mr. Krabs is a hardcore cryptocurrency and blockchain technology enthusiast. In a recent conference, he heard about a new cryptocurrency called ByteConn333ct, which promises a very high rate of return. He wants to invest in this cryptocurrency, but its unique conversion rate to Canadian dollars makes him a bit apprehensive.
Several steps are need to compute the value of
Since Mr. Krabs is already so rich from his successful fast
food restaurant business, he has decided to dump all of his
life’s saving into investing ByteConn333ct. Mr. Krabs
can’t wait to find out what amazing returns he will get, so he
has hire you to compute the value of
Input
The first line of the input contains a single integer
Output
Output the value of
Sample Input 1 | Sample Output 1 |
---|---|
3 361 |
3 |
Sample Input 2 | Sample Output 2 |
---|---|
2 11 |
0 |
Sample Input 3 | Sample Output 3 |
---|---|
4 3051 |
6 |