Problem:


Score: 200 points

Problem Statement

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

Output

If there are values that could be X, the price of the apple pie before tax, print any one of them.

If there are multiple such values, printing any one of them will be accepted.

If no value could be X, print :(.

Sample Input 1

432

Sample 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.

Sample Input 2

1079

Sample Output 2

:(

There is no possible price before tax for which you have to pay 1079 yen with tax.

Sample Input 3

1001

Sample 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.



Sample input:
432


Sample output:
400

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy
 
## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
#    S = []
#    for _ in range(N):
#        S.append(list(input()))
 
N=int(input())

for i in range(1,N+1):
    if floor(i*1.08)==N:
        print(i)
        sys.exit()
print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
x = math.ceil(n / 1.08)
print(':(' if int(x * 1.08) != n else x)

Submission status: Accepted

Solution code:
def resolve():
    paid = int(input())
    import math
    price = math.ceil(paid * 100 / 108)
    if price * 108 // 100 == paid:
        print(price)
    else:
        print(":(")


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
N = int(input())

for i in range(1,50001):
    if int(i * 1.08) == N:
        print(i)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

for X in range(1, N+1):
    if X*108//100==N:
        print(X)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())
x = math.floor(N / 1.08)
y = math.ceil(N / 1.08)

if int(x*1.08) == N:
    print(x)
elif int(y*1.08) == N:
    print(y)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n=int(input())
for i in range(1,n+1):
  if math.floor(i*1.08)==n:
    print(i)
    break
  else:
    continue
else:
  print(":(")

Submission status: Accepted

Solution code:
n=int(input())

ans=-1
for i in range(1,n+1):
  if int(i*1.08)==n:
    ans=i

if ans!=-1:
  print(ans)
else:
  print(":(")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
def main():
    N = int(input())
    if N % 1.08 == 0:
        print(N/1.08)
    else:
        x = math.ceil(N/1.08)
        if x < (N+1)/1.08:
            print(x)
        else:
            print(':(')
    return
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
for i in range(1, 50000):
  if i * 108 // 100 == n:
    print(i)
    exit()
print(':(')

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
s = 0

while s < n:
    ans += 1
    s = int(ans*1.08)
    if s == n:
        print(ans)

if s != n:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())
x=n//1.08

if int((x-1)*1.08)==n:
  print(int(x-1))
elif int(x*1.08)==n:
  print(int(x))
elif int((x+1)*1.08)==n:
  print(int(x+1))
else:
  print(":(")

Submission status: Accepted

Solution code:
N=int(input())

ans=N/1.08

ans=int(ans)
flag=True

while flag:
    if int(ans*1.08)<N:
        ans+=1
    elif int(ans*1.08)==N:
        break
    else:
        print(':(')
        flag=False
    
if flag:
    print(ans)

Submission status: Accepted

Solution code:
N = int(input())

senter = N // 1.08

for i in range(1000):
    if int((senter-100+i) * 1.08) == N:
        print(int(senter-100+i))
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
c=0
for i in range(50000):
  if int(i * 1.08) == n:
    print(i)
    c = 1
    break
if c == 0:
  print(":(")

Submission status: Accepted

Solution code:
n=int(input())
import math
print( math.ceil(n/1.08) if math.floor(math.ceil(n/1.08)*1.08)==n else ":(")

Submission status: Accepted

Solution code:
#4
import sys
N = int(input())
x,y,k = 0,0,0

if N == 1:
    print(1)
    sys.exit()
elif N <= 12:
    print(N)
    sys.exit()
x = int(0.8*N)

for i in range(x,N):
    k = str(i*108)
    if int(k[0:-2]) == N:
        print(i)
        y +=1
        break

if y !=1:
    print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())
x = int(math.ceil(N / 1.08))

if int(x * 1.08) == N:
    print(x)
else:
    print(":(")

Submission status: Accepted

Solution code:
# your code goes here
def my_index(l, x, default=False):
    if x in l:
        return int(l.index(x))+1
    else:
        return default

ans = []

num = int(input())

for i in range(1,50001):
    ans.append(int(i*1.08))

print(my_index(ans,num,":("))

Submission status: Accepted

Solution code:
n =int(input())
min = n//1.08
max = n//1.08+1
ans = 0
if int(min*1.08) == n:
    ans = min
if int(max*1.08) == n:
    ans = max
if ans != 0:
    print(int(ans))
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

def main():

    n = int(input())
    tax = 1.08
    
    ans = math.ceil(n / tax)
    ans_check = ans * tax
    if math.floor(ans * tax) == n:
        print(ans)
    else:
        print(":(")
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
t = int(N/1.08)
if(t*1.08 == N):
    print(t)
elif(int((t+1)*1.08) == N):
    print(t+1)
elif(int((t-1)*1.08) == N):
    print(t-1)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())
x = int(math.ceil(N / 1.08))
if int(x * 1.08) == N:
    print(x)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
N = int(input())
TAX = 1.08
a = math.ceil(N / TAX)
print(a) if math.floor(a * TAX) == N else print(":(")

Submission status: Accepted

Solution code:
def main():
    from decimal import Decimal
    x = Decimal(input())
    for i in range(60000):
        if int(Decimal(i)*Decimal('1.08'))==x:
            return i
    return ':('
print(main())

Submission status: Accepted

Solution code:
N = int(input())

X = int(N/1.08)

for i in [-1, 0, 1]:
    X_ = int((X+i)*1.08)
    if(X_ == N):
        print(X+i)
        exit()

print(':(')

Submission status: Accepted

Solution code:
n=int(input())
ans=':('
for i in range(1,n+1):
  if int((i*1.08)//1)==n:
    ans=i
    break
print(ans)

Submission status: Accepted

Solution code:
import math
n = int(input())
x, y = math.floor(n / 1.08), math.ceil(n / 1.08)
ans = ":("
if int(x * 1.08) == n:
    ans = x
elif int(y * 1.08) == n:
    ans = y
print(ans)

Submission status: Accepted

Solution code:
import math

N = int(input())
X = 0
a = 0
for i in range(50000):
  X = math.floor(1.08*i)
  if(X==N):
    print(i)
    a+=1
    break
if(a ==0):
  print(":(")

Submission status: Accepted

Solution code:
N = int(input())

for i in range(50000):
    if N == i*108//100:
        print(i)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
from math import ceil
n=int(input())
""" flag=True
xceil=ceil(n/1.08)
xfloor=int(n/1.08)
for i in range(xfloor,xceil+1):
    if int(i*1.08)==n:
        print(i)
        flag=False
        break
if flag:
    print(":(") """

flag = True
for i in range(1,50001):
    if int(i*1.08)==n:
        print(i)
        flag=False
        break
if flag:
    print(":(")

Submission status: Accepted

Solution code:
from math import ceil
n=int(input())
flag=True
xceil=ceil(n/1.08)
xfloor=int(n/1.08)
for i in range(xfloor,xceil+1):
    if int(i*1.08)==n:
        print(i)
        flag=False
        break
if flag:
    print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())
X = N / 1.08

floor = math.ceil(N/1.08)
ceil = math.ceil((N+1)/1.08)

for i in range(floor,ceil):
    print(i)
    break
else:
    print(":(")

Submission status: Accepted

Solution code:
def resolve():
    import math
    n = int(input())
    for i in range(1, n+1):
        if math.floor(i * 1.08) == n:
            print(i)
            quit()
    print(":(")
resolve()

Submission status: Accepted

Solution code:
N=int(input())
P,Q=108,100

A=(N*Q+P-1)//P
B=((N+1)*Q+P-1)//P-1

if A>B:
    print(":(")
else:
    print(A)

Submission status: Accepted

Solution code:
N = int(input())
 
for i in range(1, N + 1):
  if i + (i * 8) // 100 == N:
    print(i)
    break
else:
  print(":(")

Submission status: Accepted

Solution code:
n = int(input())

dic = {}
for i in range(1,50000):
    dic[int(i * 1.08)] = i

if n in dic:
    print(dic[n])
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

def bs(ok, ng, solve):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    return ok

ans = bs(n, 0, lambda x: x * 1.08 >= n)
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n = int(input())

x_min = n * 100 / 108
x_max = (n + 1) * 100 / 108

print(math.ceil(x_min) if math.ceil(x_min) < x_max else ':(')

Submission status: Accepted

Solution code:
# ####################################################################
# import io
# import sys

# _INPUT = """\
# 1001
# 1079
# 432

# 12 5 2
# cabbabaacaba

# 10 2 3
# abccabaabb
# """
# sys.stdin = io.StringIO(_INPUT)
####################################################################
import sys
def p(*_a):
  return
  _s=" ".join(map(str,_a))
  #print(_s)
  sys.stderr.write(_s+"\n")
####################################################################
yn = lambda b: print('Yes') if b else print('No')
####################################################################
N = int(input())

NO = ":("

a = (N-1) // 1.08

for i in range(100):
  b = a + i
  if int(b * 1.08) == N:
    print( int(b) )
    exit()

print(NO)

Submission status: Accepted

Solution code:
# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

N = int(input())

Xf = N / 1.08

if int(Xf) == Xf:
    print(int(Xf))
elif int((int(Xf)+1)*1.08) == N:
    print(int(Xf)+1)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())

min = math.floor(N / 1.08)
max = math.ceil(N/ 1.08)
flag = False
for i in range(min,max+1):
    ans = math.floor(i*1.08)
    if N == ans:
        X = i
        flag = True
        break
if(flag):
    print(X)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())

a = int(N/1.08)

for i in range(a-1, a+2):
    if int(i*1.08) == N:
        result = i
        break
else:
    result = ":("

print(result)

Submission status: Accepted

Solution code:
N=int(input())

a=N//1.08
if int(a*1.08)==N:
    print(int(a))
elif int((a+1)*1.08)==N:
    print(int(a+1))

else:
    print(':(')

Submission status: Accepted

Solution code:
import math
n = float(input())
m = n / 1.08
if math.floor(math.floor(m) * 1.08) == n:
    print(math.floor(m))
elif math.floor(math.ceil(m) * 1.08) == n:
    print(math.ceil(m))
else:
    print(':(')

Submission status: Accepted

Solution code:
from math import ceil,floor

N=int(input())
X=ceil(N/1.08)
print(X if floor(X*1.08)==N else ":(")

Submission status: Accepted

Solution code:
n = int(input())
import math
for i in range (50000):
  x = i*1.08
  if math.floor(x) == n:
    print(i)
    exit()
print(":(")

Submission status: Accepted

Solution code:
import math
n=int(input())
num=math.ceil(n/1.08)
check=int(num*1.08)
if check==n:
    print(num)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
res = int(N / 1.08)
if int(res * 1.08) == N:
    print(res)
elif int((res + 1) * 1.08) == N:
    print(res + 1)
else:
    print(':(')

Submission status: Accepted

Solution code:
import math

N = int(input())

result = math.ceil(N / 1.08)

comfirm_result = int(result * 1.08)

if comfirm_result == N:
    print(result)
else:
    print(':(')

Submission status: Accepted

Solution code:
n = int(input())
for i in range(50001):
  if int(i * 1.08) == n:
    print(i)
    exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())
x = int(n / 1.08)

while int(x*1.08) <= n:
    if int(x*1.08) == n:
        print(x)
        break
    else:
        x += 1

if int(x*1.08) > n:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

from decimal import Decimal

def calc(n):
    for i in range(60000):
        if int(Decimal(i) * Decimal('1.08')) == n:
            return i
    return ':('

print(calc(n))

Submission status: Accepted

Solution code:
def n_cand(x):
    return int(x*1.08)

n = int(input())

x = round(n / 1.08)
n_dash = n_cand(x)
n_dash_m = n_cand(x-1)
n_dash_p = n_cand(x+1)
if n_dash == n:
    print(x)
elif n_dash_m == n:
    print(x-1)
elif n_dash_p == n:
    print(x+1)
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys

n = int(input())

for i in range(int(n / 1.08), int(n / 1.08) + 2):
    if int(i * 1.08) == n:
        print(i)
        sys.exit()
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())

X_MAX = 50001
for x in range(X_MAX):
    if int(x * 1.08) == n:
        print(x)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N = int(input())

price = int(N / 1.08)

if int(price * 1.08) == N:
    print(price)
elif int((price + 1) * 1.08) == N:
    print(price + 1)
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
import math
a = n*100/108
b = (n*100+100)/108
ans = math.ceil(a) if math.ceil(a) < b else ":("
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

if N == int(int(N/1.08)*1.08):
    print(int(N/1.08))
elif N == int((int(N/1.08)+1) *1.08):
    print(int((int(N/1.08)+1)))
else:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())
for x in range(n+1):
    if int(x*1.08)==n:
        print(x)
        exit()
print(":(")

Submission status: Accepted

Solution code:
N=input()
N=float(N)
import math
X=math.ceil(N/1.08)
if int(X*1.08)==N:
  print(X)
else:
  print(':(')

Submission status: Accepted

Solution code:
def readinput():
    n=int(input())
    return n

def main(n):
    x7=int(n/1.07)+1
    x9=int(n/1.09)-1
    n100=n*100
    for x in range(max(1,x9),x7+1):
        xx=x*108//100
        #print(x,xx)
        if xx==n:
            print(x)
            break
    else:
        print(':(')

        

if __name__=='__main__':
    n=readinput()
    main(n)

Submission status: Accepted

Solution code:
def readinput():
    n=int(input())
    return n

def main(n):
    x7=int(n/1.07)
    x8=int(n/1.08)
    x9=int(n/1.09)
    n100=n*100
    for x in range(max(1,x9-1),x7+1+1):
        xx=x*108//100
        #print(x,xx)
        if xx==n:
            print(x)
            break
    else:
        print(':(')

        

if __name__=='__main__':
    n=readinput()
    main(n)

Submission status: Accepted

Solution code:
n = int(input())

for i in range(1,n+1):
  x = i * 108
  x //= 100
  if x == n:
    print(i)
    exit()
print(":(")

Submission status: Accepted

Solution code:
import math
n = int(input())
x = math.ceil(n / 1.08)
print(x if math.floor(x * 1.08) == n else ':(')

Submission status: Accepted

Solution code:
n = int(input())
x, mod = divmod(n, 1.08)
print(x if mod == 0 else
      int(x + 1) if int((x+1)*1.08) == n
      else ':(')

Submission status: Accepted

Solution code:
N = int(input())

for x in range(N+1):
    if int(x*1.08) == N:
        print(x)
        break
else:
    print(':(')

Submission status: Accepted

Solution code:
import math
N = int(input())
X = N/1.08 
Y = math.ceil(X)
Z = math.floor(Y*1.08)
if N == Z:
  print(Y)
else:
  print(':(')

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    for i in range(N + 1):
        ans = i * 108
        ans = ans // 100
        if ans == N:
            print(i)
            return
    print(':(')

main()

Submission status: Accepted

Solution code:
N = int(input())

X = N / 1.08

X_down = int(X)
X_up = int(X) + 1

bool_down = int(X_down * 1.08) == N
bool_up = int(X_up * 1.08) == N

if bool_down:
    print(X_down)
elif bool_up:
    print(X_up)
else:
    print(":(")

Submission status: Accepted

Solution code:
def resolve():
    import math
    N = int(input())
    for i in range(N+1):
        if math.floor(i*1.08) == N:
            print(i)
            exit()
    print(":(")
resolve()

Submission status: Accepted

Solution code:
def resolve():
    x = int(input().strip())
    a =int( x // 1.08 )
    b =int( -1 * (-1 * x // 1.08))
    ans = ':('
    if int(a * 1.08) == x:
        ans = int(a)
    if int(b * 1.08) == x:
        ans = int(b)
    print(ans)
resolve()

Submission status: Accepted

Solution code:
N = int(input())

n = int(N/1.08)
while int(n*1.08) <= N:
    if int(n*1.08) == N:
        print(n)
        break
    else:
        n += 1
else:
    print(":(")

Submission status: Accepted

Solution code:
import numpy as np


N = int(input())

X = int(np.ceil(N/1.08))
if np.floor(X*1.08)!=N:
    X = ':('

print(X)

Submission status: Accepted

Solution code:
from sys import stdin
import math
N = int(stdin.readline().rstrip())

for i in range(1, 50000):
  if math.floor(i * 1.08) == N:
    print(i)
    exit()
print(":(")

Submission status: Accepted

Solution code:
import math

N = int(input())

X = math.ceil(N / 1.08)

if math.floor(X * 1.08) == N:
    print(X)
else:
    print(":(")

Submission status: Accepted

Solution code:
import math
def taxminus(X):
    return X/1.08,(X+1)/1.08
N=int(input())
min,max=taxminus(N)
min=math.ceil(min)
if min>=max:
    print(":(")
else:
    print(min)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import math

def main():
    n = int(input())

    div = n/1.08
    fl = math.floor(div)
    if math.floor(fl*1.08) == n:
        print(fl)
    elif math.floor((fl+1)*1.08) == n:
        print(fl+1)
    else:
        print(":(")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

import decimal
import math
N = ri()
for i in range(N + 1):
    if math.floor(i * decimal.Decimal(1.08)) == N:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
N = int(input())
X = int(-(-N // 1.08))
print(X if int(X * 1.08) == N else ':(')

Submission status: Accepted

Solution code:
def main(N, rate=1.08):
    X = int(-(-N // 1.08))
    return X if int(X * rate) == N else -1


if __name__ == "__main__":
    N = int(input())
    ans = main(N)
    print(ans if ans > 0 else ':(')

Submission status: Accepted

Solution code:
from math import floor

def main(N, rate=1.08):
    ans = -1
    for x in range(1, N+1):
        if floor(x * 1.08) == N:
            ans = x
    return ans


if __name__ == "__main__":
    N = int(input())
    ans = main(N)
    print(ans if ans > 0 else ':(')

Submission status: Accepted

Solution code:
n=int(input())
for i in range(n+1):
    if int(i*1.08)==n:
        print(i)
        exit()
print(':(')

Submission status: Accepted

Solution code:
import math
N = int(input())
flag = False
Min = math.floor(N / 1.08)
Max = math.floor( ( N + 1 ) / 1.08 + 1)
for i in range(Min, Max + 1):
  if math.floor( i * 1.08 ) == N:
    print( i )
    flag = True
    break
if not flag:
  print(':(')

Submission status: Accepted

Solution code:
# template by 3xC and starkizard.
# contributors: 

#####################################################################################
from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

#####################################################################################

"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod
 
    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)
 
def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): # math.gcd is slower
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def ceil(n, k=1): return n // k + (n % k != 0) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []
def write(s): return sys.stdout.write(s)












###################################################################
def main():
    #CODE GOES HERE:
    n=ii()
    c=n/1.08
    if int(int(c)*1.08)==n:
        print(int(c))
    elif int((int(c)+1 )*1.08)==n:
        print(int(c+1))
    else:
        print(":(")

















































""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""
 
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange
 
import os, sys
from io import IOBase, BytesIO
 
BUFSIZE = 8192
 
class FastIO(BytesIO):
    newlines = 0
 
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None
 
    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s
 
    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()
 
    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)
 
 
class IOWrapper(IOBase):
 
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')
 
""" main function"""
 
if __name__ == '__main__':
    main()
    # threading.Thread(target=main).start()

Submission status: Accepted

Solution code:
n = int(input())
for i in range(1,n+1):
    if int(i*1.08) == n:
        print(i)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
import math

n = int(input())
# x = int(n/1.08+.5)
x = math.ceil(n/1.08)
print(x) if math.floor(x*1.08) == n else print(':(')

Submission status: Accepted

Solution code:
n = int(input())

xmin = int(n/1.08)
xmax = int((n+1)/1.08)


if n%27 == 0:
  print(xmax)
elif (n+1)%27 == 0:
  print(":(")
elif xmin == xmax:
  print(":(")
else:
  print(xmax)

Submission status: Accepted

Solution code:
import math

n = int(input())
x = math.ceil(n/1.08)
if math.floor(x * 1.08) == n:
    print(x)
else:
    print(":(")

Submission status: Accepted

Solution code:
n=int(input())
if (((n/1.08)//1)*1.08)//1==n:
    print(int((n/1.08)//1))
elif (((n/1.08)//1+1)*1.08)//1==n:
    print(int(((n+1)/1.08)//1))
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
for i in range(1, n + 1):
    ans = int(i * 1.08)
    if ans == n:
        print(i)
        quit()
print(':(')

Submission status: Accepted

Solution code:
import math
N = int(input())

for i in range(N+1):
    if math.floor(1.08 * i) == N:
        print(i)
        exit()

print(":(")

Submission status: Accepted

Solution code:
import sys
n=int(input())
for i in range(n+1):
    if int(i*1.08)==n:
        print(i)
        sys.exit()
print(":(")

Submission status: Accepted

Solution code:
n=int(input())

dic={}
for i in range(1,50001):
    p=int(i*1.08)
    dic[p]=i
if n in dic:
    print(dic[n])
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(1, n+1):
    if int(i * 1.08) == n:
        ans = i

if ans == 0:
    print(":(")
else:
    print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

def bs(ok, ng, solve):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    return ok

ans = bs(ok=n, ng=0, solve=(lambda x: x * 1.08 >= n))
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')

Submission status: Accepted

Solution code:
N = int(input())
import math
if int(math.floor((math.ceil(N/1.08) * 1.08)))==N:
    print(int(math.ceil(N/1.08)))
else:
     print(":(")

Submission status: Accepted

Solution code:
N=int(input())
for i in range(50000):
  if int(i*1.08)==N:
    print(i)
    exit()
print(':(')

Submission status: Accepted

Solution code:
# sumitb2019_b_bacha.py
N = int(input())
for i in range(50000):
    if int(i*1.08) == N:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())

for i in range(n+1):
  if int(i*1.08+0.00001)==n:
    print(i)
    exit()
print(":(")

Submission status: Accepted

Solution code:
import math
N = int(input())

for i in range(1,46298):
    if math.floor(i*1.08) == N:
        print(i)
        exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())
for i in range(n+1):
         if int((i * 1.08) // 1) == n:
                  print(i)
                  exit()
print(":(")

Submission status: Accepted

Solution code:
n = int(input())
mi = n / 1.08
ma = (n+1) / 1.08
tar = int(mi)
while(tar <= ma):
    if mi <= tar < ma:
        print(tar)
        quit()
    tar += 1
print(":(")

Submission status: Accepted

Solution code:
n=int(input())
for x in range(n+1):
    if x*108//100==n:
        print(x)
        break
else:
    print(":(")

Submission status: Accepted

Solution code:
n = int(input())
for x in range(n+1):
    if x * 108 // 100 == n:
        print(x)
        break
else:
    print(':(')