Tax Rate

AtCoder
IDsumitb2019_b
Time2000ms
Memory256MB
Difficulty
Takahashi bought a piece of apple pie at ABC Confiserie. According to his memory, he paid $N$ yen (the currency of Japan) for it. The consumption tax rate for foods in this shop is $8$ percent. That is, to buy an apple pie priced at $X$ yen before tax, you have to pay $X \times 1.08$ yen (rounded down to the nearest integer). Takahashi forgot the price of his apple pie before tax, $X$, and wants to know it again. Write a program that takes $N$ as input and finds $X$. We assume $X$ is an integer. If there are multiple possible values for $X$, find any one of them. Also, Takahashi's memory of $N$, the amount he paid, may be incorrect. If no value could be $X$, report that fact. ## Constraints * $1 \leq N \leq 50000$ * $N$ is an integer. ## Input Input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
432
Output #1
400

If the apple pie is priced at $400$ yen before tax, you have to pay $400 \times 1.08 = 432$ yen to buy one.  
Otherwise, the amount you have to pay will not be $432$ yen.
Input #2
1079
Output #2
:(

There is no possible price before tax for which you have to pay $1079$ yen with tax.
Input #3
1001
Output #3
927

If the apple pie is priced $927$ yen before tax, by rounding down $927 \times 1.08 = 1001.16$, you have to pay $1001$ yen.
API Response (JSON)
{
  "problem": {
    "name": "Tax Rate",
    "description": {
      "content": "Takahashi bought a piece of apple pie at ABC Confiserie. According to his memory, he paid $N$ yen (the currency of Japan) for it. The consumption tax rate for foods in this shop is $8$ percent. That i",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "sumitb2019_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Takahashi bought a piece of apple pie at ABC Confiserie. According to his memory, he paid $N$ yen (the currency of Japan) for it.\nThe consumption tax rate for foods in this shop is $8$ percent. That i...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments