Harryxun/stf_run huggingface dataset:
n = int(input())


x = n - 2
y = n - x

if n < 10:
    print(n)
if n = 10:
    print(1)
else:
    resulty, resultx = 0, 0

    while(x > 0):
        resultx += x % 10
        x = x // 10

    while(y > 0):
        resulty += y % 10
        y = y // 10

    #print(resulty+resultx)
    z = n//2

    result = 0
    while(z > 0):
        result += z % 10
        z = z // 10

    if result*2 < resulty+resultx:
        print(result*2)
    else:
        print(resulty+resultx)



### FIXED CODE ###

def sum_value(n):
    n = str(n)
    sum = 0
    for i in range(len(n)):
        sum+=int(n[i])
    return sum

N = int(input())
A = int(N/2)
B = int(N/2) if N%2 == 0 else int(N/2)+1
menor = -1
for i in range(int(N/2)):
    menor = sum_value(A+i)+sum_value(B-i) if menor < 0 else min(sum_value(A+i)+sum_value(B-i), menor) 
print(menor)
N = int(input())

lis = []

for i in range(N):
	lis.append(int(input()))
	
lis.sort(reverse = True)

for i in range(N):
	if N - 1 == i:
		break
	
	if lis.count(lis[i]) >= 2:
		del lis[i]
	

print(len(lis))

### FIXED CODE ###

N = int(input())

Ans = set()

for i in range(N):
	Ans.add(int(input()))
	
print(len(Ans))
#!/usr/bin/env python
# coding: utf-8

# In[64]:


import numpy as np
H, W = map(int, input().split())
S = np.array([list(input()) for i in range(H)])
"""
4 6
#..#..
.....#
....#.
#.#...
"""


# In[72]:


field = np.ones((H, W))
field[S=='#'] = 0
lm, rm, um, dm = (field.copy() for _ in [0]*4)
#print(field)


# In[73]:


#np.where()
for i in range(1, H):
    um[i] = (um[i-1]+1) * field[i]
    dm[-1-i] = (dm[-i]+1) * field[i]
    
for i in range(1, W):
    lm[:, i] = (lm[:, i-1]+1) * field[:, i]
    rm[:, -1-i] = (rm[:, -i]+1) * field[:, i]


# In[75]:


#print(um)
#print(dm)
#print(lm)
#print(rm)
print(int(np.max(um+dm+lm+rm)-3))


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[2]:


P, Q, R = map(int, input().split())


# In[3]:


t = [P, Q, R]
print(sum(t)-max(t))


# In[ ]:
import itertools
import numpy as np
n, m, x = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]
l = sorted(l)
l = np.array(l)
ans = np.sum(l, 0)[0]
ans_s = np.sum(l, 0)
if np.any(ans_s[1:] < x):
    print(-1)
    exit()
count = 0
for i in range(1, n + 1):
    for j in itertools.combinations(l, i):
        tot = np.sum(j, 0)
        if np.all(tot[1:] >= x) and tot[0] < ans:
            ans = tot[0]
            print(int(ans))
            exit()


### FIXED CODE ###

s = input()
t = input()
if s == t[:-1]:
    print('Yes')
else:
    print('No')
import collections
import random
n=int(input())
a=list(map(int,input().split()))
if len(set(a))==1 and a[0]==0:
  print('Yes')
elif n%3!=0:
  print('No')
elif len(set(a))!=3:
    print('No')
  else:
    print('Yes')
else:
  a=list(set(a))
  for i in range(len(a)):
    a[i]=format(a[i],'020b')
  l=[0 for i in range(20)]
  for i in range(len(a)):
    for j in range(20):
      if a[i][j]=='1':
        l[j]+=1
  ct=0
  for j in range(20):
    if l[j]==2 or l[j]==0:ct+=1
  if ct==20:
    print('Yes')
  else:
    print('No')

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  a[i]=format(a[i],'030b')
l=[0 for i in range(30)]
for i in range(n):
  for j in range(30):
    if a[i][j]=='1':
      l[j]+=1
for j in range(30):
  l[j]=l[j]%2
 
if 1 in l:
  print('No')
else:
  print('Yes')
A,B,C,K=map(int,input().split())
if (A>=K):
	print(K)
else:
	K = K-A
	if (B>=D):
		print(A)
	else:
		K = K-B
		print(A-K)

### FIXED CODE ###

A,B,C,K=map(int,input().split())
if (A>=K):
	print(K)
else:
	K = K-A
	if (B>=K):
		print(A)
	else:
		K = K-B
		print(A-K)
def f():
 n,c=map(int,input().split())
 for h in'9731':
  if n>1:
   for m in range(int(10**(n-1)),0,-1):
    if((int(h)+m-1)*2+(c>=0)*c)%3:
     t=h+str(m-1).zfill(n-1)
     a=int(t+str(c)*(c>=0)+t[::-1])
     if 2 in[x,pow(2,x,x)]:
      for i in range(3,int(a**.5+1),2):
       if a%i==0:break
      else:return a
  else:
   a=int(h+str(c)*(c>=0)+h)
   if 2 in[x,pow(2,x,x)]:
    for i in range(3,int(a**.5+1),2):
     if a%i==0:break
    else:return a
 return'9'*n+str(c)*(c>=0)+'9'*n
print(f())


### FIXED CODE ###

def p(x):
 for i in range(3,int(x**.5+1),2):
  if x%i==0:return 0
 return 1
def f():
 n,c=map(int,input().split())
 s='9'*n
 if c<0:return(11,s+s)[n>1]
 for h in'9731':
  if n-1:
   for m in range(int(10**~-n),0,-1):
    t=h+str(m-1).zfill(n-1)
    a=int(t+str(c)+t[::-1])
    if p(a):return a
  else:
   a=int(h+str(c)+h)
   if p(a):return a
 return s+str(c)+s
print(f())
import math
import copy
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n1 = int(input())
nl1 = [int(i1) for i1 in input().split()]

r1 = 0
for  i2 in range(n1):
    nl2 = copy.copy(nl1)
    if i2 == 0:
        nl2[i2] = nl1[1]
    else:
        nl2[i2] = nl1[i2 - 1]
    r1 = max(r1,gcd_list(nl2))

print(r1)

### FIXED CODE ###

import fractions
import sys

n1 = int(input())
nl1 = [int(i1) for i1 in input().split()]

if n1 == 2:
    print(max(nl1))
    sys.exit()

r1 = 0

nl1.sort()

if n1 >= 3:
    n2 = fractions.gcd(nl1[0], nl1[1]) 
    n2 = max(n2, fractions.gcd(nl1[1], nl1[2]))
    n2 = max(n2, fractions.gcd(nl1[0], nl1[2]))

c1 = 0
for i2 in range(n1):
    if nl1[i2] % n2 != 0:
        c1 += 1
    if c1 >= 2:
        break
    if i2 == (n1 - 1):
        r1 = n2

i3 = n2

while r1 == 0:
    c1 = 0
    for i4 in range(n1):
        if nl1[i4] % i3 != 0:
            c1 += 1
        if c1 >= 2:
            break
        if i4 == (n1 - 1):
            r1 = i3
    i3 -= 1

print(str(r1))
N=int(input())
j=0
for i in range(N):
  D1,D2=map(int,input().split())
  if D1==D2:
    j+=1
    if j>=3:
      J=3
  else:
    j=0
if J>=3:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N=int(input())
j=0
J=0
for i in range(N):
  D1,D2=map(int,input().split())
  if D1==D2:
    j+=1
    if j>=3:
      J=3
  else:
    j=0
if J>=3:
  print('Yes')
else:
  print('No')
from collections import defaultdict
N = int(input())
##
v = defaultdict(lambda: [])
d = [defaultdict(lambda: 0) for _ in range(N+1)]
##
for i in range(N-1):
    a,b,c = map(int,input().split())
    v[a].append(b)
    v[b].append(a)
    d[a][b] = c
    d[b][a] = c
Q,K = map(int,input().split())
##
reached = defaultdict(lambda: 0)
def f(p,pcd):
    global v,d,K,reached
    reached[p] = 1
    d[K][p] = pcd
    for c in v[p]:
        if reached[c] == 0:
            f(c, pcd+d[p][c])
f(K,0)
##
for i in range(Q):
    x,y = map(int,input().split())
    print(d[K][x]+d[K][y])

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
N = int(input())
T = [[]for i in range(N+1)]
for i in range(N-1):
    a,b,c = map(int,input().split())
    T[a].append((b,c))
    T[b].append((a,c))
Q,K = map(int,input().split())
D = [0]*(N+1)
def f(v,p,cost):
    global T,K,D
    for C in T[v]:
        if C[0]!=p:
            D[C[0]] = cost+C[1]
            f(C[0],v,cost+C[1])
f(K,0,0)
for i in range(Q):
    x,y = map(int,input().split())
    print(D[x]+D[y])
import fractions


def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


N, M = map(int, input().split())
S = input()
T = input()
length = lcm(N,M)
    
for i in range(length):
    if i%(length//N)==0 and i%(length//M)==0:
        if S[i//(length//N)] != T[i//(length//M)]:
            return -1
return length

### FIXED CODE ###

import fractions


def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def check():
    N, M = map(int, input().split())
    S = input()
    T = input()
    length = lcm(N,M)
        
    for i in [a*(length//N) for a in range(N)]:
        if i%(length//M)==0:
            if S[i//(length//N)] != T[i//(length//M)]:
                return -1
    return length
  
print(check())
N = input()
S = input()
K =int(Input())

for s in S: print(s if s ==  S[K-1] else "*". end = "")

### FIXED CODE ###

N = input()
S = input()
k = int(input())

for s in S: print(s if s == S[k-1] else "*", end="")
# -*- coding: utf-8 -*-

import itertools
import numpy as np

def main():

    N,M,X= map(int, input().split())
    matrix = [list(map(int, input().split())) for i in range(N)]

    l= []

    for i in range(N):
        for pair in itertools.combinations(matrix, i+1):
            row_sum = np.sum(pair, axis=0)
            print(row_sum)
            for j in range(len(row_sum)):
                if j == 0:
                    continue
                if row_sum[j] < X:
                    break
                l.append(row_sum[0])


    if len(l) == 0:
        print('-1')
    else:
        print(min(l))
if __name__ == '__main__':
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-

import itertools
import numpy as np


def main():

    n, m, x= map(int, input().split())
    matrix = np.array([list(map(int, input().split())) for _ in range(n)], dtype=np.int32)

    out = 10**18
    for i in itertools.product([False,True], repeat=n):
        row_sum = np.sum(matrix[np.where(i)], axis=0)
        if m == np.count_nonzero(row_sum[1:] >= x):
            out = min(out, row_sum[0])

    if out == 10**18:
        print('-1')
    else:
        print(out)


if __name__ == '__main__':
    main()
n = int(raw_input())

card = {"S":[0]*13, "H":[0]*13, "C":[0]*13, "D":[0]*13} 
 
for i in range(n):
  mark, nums = raw_input().split()
  deck[mark][int(nums)-1] = 1
 
for i in ["S", "H", "C", "D"]:
  for j in range(13):
    if deck[i][j] == 0:
      print "%s %d" % (i, j+1)

### FIXED CODE ###

n = int(raw_input())

card = {"S":[0]*13, "H":[0]*13, "C":[0]*13, "D":[0]*13} 
 
for i in range(n):
  mark, nums = raw_input().split()
  card[mark][int(nums)-1] = 1
 
for i in ["S", "H", "C", "D"]:
  for j in range(13):
    if card[i][j] == 0:
      print "%s %d" % (i, j+1)
x = int(input())
sosuu = list(sieve.primerange(2, 1000000))
for i in sosuu:
    if i >= x:
        print(i)
        break

### FIXED CODE ###

x = int(input())
flag = False
for i in range(x, 1000000):
    for j in range(2, i+1):
        #print(i, j)
        if j == i:
            print(i)
            flag = True
            break
        if i % j == 0:
            #print('*', i, j)
            break
    if flag:
        break
N = int(input())
ab = [[0, 0] for i in range(N)]
b = [0]*N
cd = [[0, 0] for i in range(N)]
d = [0]*N

for i in range(N):
    ab[i] = list(map(int, input().split()))
for i in range(N):
    cd[i] = list(map(int, input().split()))

points2 = [[] for i in range(N)]
ab.sort(key=lambda x: x[0])
ab.sort(key=lambda x: x[1])

for i in range(N):
    for j in range(N):
        if ab[i][0] < cd[j][0] and ab[i][1] < cd[j][1]:
            points2[j].append(i)

points2.sort(key=lambda x: len(x))
ans = 0

for i in range(N):
    if len(points[i]) == 0:
        continue
    for j in range(i+1, N):
        if points[i][0] in points[j]:
            points[j].pop(points[j].index(points[i][0]))
    ans += 1
print(ans)

### FIXED CODE ###

N = int(input())
ab = [[0, 0] for i in range(N)]
b = [0]*N
cd = [[0, 0] for i in range(N)]
d = [0]*N

for i in range(N):
    ab[i] = list(map(int, input().split()))
for i in range(N):
    cd[i] = list(map(int, input().split()))

points = [[] for i in range(N)]
points2 = [[] for i in range(N)]
cd.sort(key=lambda x: x[0])
ab.sort(key=lambda x: x[1], reverse=True)

points.sort(key=lambda x: len(x))
ans = 0

for i in range(N):
    for j in range(N):
        if ab[i][0] < cd[j][0] and ab[i][1] < cd[j][1]:
            ans += 1
            cd[j][0] = -1
            break
print(ans)
n = int(input())
s = input()
R = set()
G = set()
B = set()
for i in range(s):
    if s[i] == 'R':
        R.add(i)
    elif s[i] == 'B':
        B.add(i)
    else:
        G.add(i)
ans = 0
for r in R:
    for g in G:
        ans += len(B)
        if 2*r - g in B:
            ans -= 1
        if 2*g - r in B:
            ans -= 1
        if not (r+g)&1 and (r+g)//2 in B:
            ans -= 1
print(ans)


### FIXED CODE ###

n = int(input())
s = input()
R = set()
G = set()
B = set()
for i in range(n):
    if s[i] == 'R':
        R.add(i)
    elif s[i] == 'B':
        B.add(i)
    else:
        G.add(i)
ans = 0
for r in R:
    for g in G:
        ans += len(B)
        if 2*r - g in B:
            ans -= 1
        if 2*g - r in B:
            ans -= 1
        if not (r+g)&1 and (r+g)//2 in B:
            ans -= 1
print(ans)
n = input()
l = 0
s = []
while len(s) < 2*n:
    s = s+list(input())+[' ']
    
a = {}
for i in range(1,int(n)+1):
    a[i] = int(s[2*i-2])

result = 0
for i in range(1,int(n)+1):
    if a[a[i]] == i:
        result = result+1
result = int(result/2)
print(result)

### FIXED CODE ###

n = input()
a = input()
a = a.split(sep=' ')

result = 0
for i in range(1,int(n)+1):
    if int(a[int(a[i-1])-1]) == i:
        result = result+1
result = int(result/2)
print(result)
N=int(input())
T_N=int(input().split())
list_time=[]
for i in range(N):
    list_time.append(T_N[i])
#Ti秒の総和を求める
sum=sum(list_time)
M=int(input())
for i in range(M):
    p,x=map(int,input.split())
    #ドリンク飲んだ時と飲まないときの差を元の合計に足す。
    ans=sum+(x-list_time[p-1])
    print(ans)

### FIXED CODE ###

A,op,B=input().split()
a=int(A)
b=int(B)
 
if op == "+" :
    print(a+b)
  
elif op == "-" :
    print(a-b)
s = input()

if s == "RRR":
  print(3)
elif s == "RRS" or s == "SRR":
  print(2)
elif s = "SSS":
  print(0)
else:
  print(1)

### FIXED CODE ###

s = input()

if s == "RRR":
  print(3)
elif s == "SRR" or s == "RRS":
  print(2)
elif s == "SSS":
  print(0)
else:
  print(1)
s1,s2,s3 = map(str, input().split())
x = [s1,s2,s3]
counter = 0
for i in x:
    if i == '1':
        counter += 1
print(counter)

### FIXED CODE ###

s1s2s3 = input()
counter = 0
for i in s1s2s3:
    if i == '1':
        counter += 1
print(counter)
a = raw_input()
b = raw_input()
c = raw_input()
print(a[0])
print(b[1])
print(c[2])

### FIXED CODE ###

a = input()
b = input()
c = input()
 
print(a[0]+b[1]+c[2])
n, k = map(int, input().split())
s = input()
if s[k - 1] == "A":
    s = s[:k - 1] + "a" + s[k:]
elif s[k - 1] == "B":
    s[k - 1] = s[:k - 1] + "b" + s[k:]
else:
    s[k - 1] = s[:k - 1] + "c" + s[k:]
print(s)

### FIXED CODE ###

n, k = map(int, input().split())
s = input()
print(s[:k - 1] + s[k - 1].lower() + s[k:])
ans = 0 if x < a else 10
print(ans)

### FIXED CODE ###

X,A = map(int, input().split())

if X < A:
    print(0)
elif X >= A:
    print(10)
import numpy as np
from scipy.sparse import csr_matrix, csgraph
dfs = csgraph.depth_first_order
n, m, p, *t = map(int, open(0).read().split())
row = np.int64([a-1 for a in t[::3]])
col = np.int64([b-1 for b in t[1::3]])
data = np.int64([p-c for c in t[2::3]])
graph = csr_matrix((data, (row, col)), (n, n))
rev = csr_matrix((data, (col, row)), (n, n))
use = set(dfs(graph, 0, True, False)) & set(dfs(rev, n-1, True, False))
flag = np.array([r in use and c in use for r, c in zip(row, col)])
g = csr_matrix((data[flag], (row[flag], col[flag])), (n, n))
try:
    print(max(0, -int(csgraph.bellman_ford(g, True, (0,))[0, n-1])))
    
    1/0 #REチェック
except csgraph._shortest_path.NegativeCycleError:
    print(-1)

### FIXED CODE ###

def main():
    def dfs(edge,s):
        use={s}
        q=[s]
        while q:
            v=q.pop()
            for w in edge[v]:
                if w in use:continue
                use.add(w)
                q.append(w)
        return use
    n,m,p,*t=map(int,open(0).read().split())
    edge=[[]for _ in range(n)]
    edge_rev=[[]for _ in range(n)]
    e=[]
    for a,b,c in zip(t[::3],t[1::3],t[2::3]):
        edge[a-1].append(b-1)
        edge_rev[b-1].append(a-1)
        e.append((a-1,b-1,p-c))
    use=dfs(edge,0)&dfs(edge_rev,n-1)
    e=[(a,b,c)for a,b,c in e if a in use and b in use]
    INF=10**18
    d=[0]+[INF]*(n-1)
    for _ in range(n):
        f=False
        for a,b,c in e:
            cost=d[a]+c
            if cost<d[b]:
                d[b]=cost
                f=True
        if not f:break
    else:
        print(-1)
        exit()
    print(max(-d[-1],0))
main()
n,k = map(int,input().split())
ans = 2*k+1
if (ans > n):
  print(‘NO’)
else:
  print(‘YES’)

### FIXED CODE ###

n,k = map(int, input().split())
ans = 2*k-1
if n < ans:
  print('NO')
else:
  print('YES')
A=input()
B=input()
if A=1 and B=2:
  print(3)
if A=2 and B=3:
  print(1)
if A=3 and B=1:
  print(2)
if A=2 and B=1:
  print(3)
if A=3 and B=2:
  print(1)
if A=1 and B=3:
  print(2)

### FIXED CODE ###

A=int(input())
B=int(input())  
C=6-A-B
print(C)
n,a,b=map(int, input().split())

def cmb(n, r, mod):
    if (r<0) or (r>n):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 
N = 10**4
g1 = [1, 1] 
g2 = [1, 1] 
inverse = [0, 1] 

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

def pos(x, n, m):
    if n == 0:
        return 1
    res = pos(x*x%m, n//2, m)
    if n%2 == 1:
        res = res*x%m
    return res
    
if n==2:
    print(0)
else:
    ans=pos(2,n,mod)-1-comb(n,a,mod)-comb(n,b,mod)
    print(ans%mod)

### FIXED CODE ###

n,a,b=map(int, input().split())
 
def comb(n, r,MOD):
    p, q = 1, 1
    for i in range(r):
        p = p * (n-i) % MOD
        q = q * (i+1) % MOD
    return p * pow(q, MOD-2, MOD) % MOD

mod=10**9+7
    
A=comb(n,a,mod)
B=comb(n,b,mod)  
C=pow(2,n,mod)

if n==2:
    print(0)
else:
    print((C-1-A-B)%mod)
A,B,C = map(int,input())
print(max(B//A,C))


### FIXED CODE ###

A,B,C = map(int,input().split())
print(min(B//A,C))
N = int(input())
old_dl = [list(map(int,input().split())) for _ in range(N)]
dl = []
for k in old_dl:
    if k[2] != 0:
        dl.append(k)
if len(dl) == 1:
    print(dl[2])
else:
    for x in range(101):
        for y in range(101):
            ndl = [l[2]+abs(l[0]-x)+abs(l[1]-y) for l in dl]
            if max(ndl) == min(ndl):
                #print(ndl)
                print(x,y,max(ndl))
                exit(0)

### FIXED CODE ###

N = int(input())
old_dl = [list(map(int,input().split())) for _ in range(N)]
dl = []
for k in old_dl:
    if k[2] != 0:
        dl.append(k)
if len(dl) == 1:
    print(*dl[0])
else:
    for x in range(101):
        for y in range(101):
            ndl = [l[2]+abs(l[0]-x)+abs(l[1]-y) for l in dl]
            if max(ndl) == min(ndl):
                #print(ndl)
                print(x,y,max(ndl))
                exit(0)
import heapq

n = int(raw_input())
values = map(int, raw_input().split())
values = sorted(values)
h = []
for v in values:
  heapq.heappush(h, v)

while len(h) > 1:
  a = heapq.heappop()
  b = heapq.heappop()
  c = (a+b)/2
  heapq.heappush(h, c)
 
print heapq.heappop()


### FIXED CODE ###

import heapq
 
n = int(raw_input())
values = map(int, raw_input().split())
values = sorted(values, reverse=True)
 
print sum(((0.5)**(i+1))*v for i, v in enumerate(values)) + ((0.5)**(len(values)))*values[-1]
for i in range(0, n, 2):
  if s[i] == 'L':
    f = False

### FIXED CODE ###

s = input()
n = len(s)

f = True

for i in range(0, n, 2):
  if s[i] == 'L':
    f = False

for i in range(1, n, 2):
  if s[i] == 'R':
    f = False
    
print("Yes" if f else "No")
from collections import deque
ans = 0
n, m, k = map(int,input().split())
a = deque(list(map(int,input().split())))
b = deque(list(map(int,input().split())))
result = 0

while True:
    if ans > k:
        print(result-1)
        break
    if a[0] + b[0] == 2 * (10 ** 9 + 1):
        print(result)
        break
    if len(a) == 0 or len(b) == 0:
        a.append(10 ** 9 + 1)
        b.append(10 ** 9 + 1)
    if a[0] > b[0]:
        ans += b.popleft()
        result += 1
    else:
        ans += a.popleft()
        result += 1



#<D>
#import math
##def search_divisor_nu

### FIXED CODE ###

#(0)環境
from itertools import accumulate
import bisect
n, m, k = map(int,input().split())
#[0]足すことで上から０冊読んだという要素として加えると実装が楽に(一冊も読めんかった)
#accumulate:累積和などが求められる
a = [0] + list(accumulate(map(int,input().split())))
b = [0] + list(accumulate(map(int,input().split())))
ans =[0]

for i in range(n + 1):
    c = bisect.bisect_right(b, k - a[i]) - 1
    #k-s<0のときはインデックスがー１なので除外しなあかん
    if c != -1:
        ans.append(c + i)
print(max(ans))
n=int(input())
for i in range(10**9)
    print("Case "+str(i+1)+": "+str(n))
    n=int(input())
    if n==0:exit()


### FIXED CODE ###

n=int(input())
for i in range(10**9):
    print("Case "+str(i+1)+": "+str(n))
    n=int(input())
    if n==0:exit()
def main():
    sx, sy, tx, ty = map(int, input().split())
    print(
        ''.join(
            [
                'U' * (ty - sy),
                'R' * (tx - sx),
                'D' * (ty - sy),
                'L' * (tx - sx + 1),
                'U' * (ty - sy + 1),
                'R' * (tx - sx + 1),
                'D',
                'R',
                'D' * (ty - sy + 1),
                'L' * (tx - sx + 1),
                'U'
            ]
        )
    )


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    sx, sy, tx, ty = map(int, input().split())
    path = []
    path.append(''.join('U' * (ty - sy)))
    path.append(''.join('R' * (tx - sx)))
    path.append(''.join('D' * (ty - sy)))
    path.append(''.join('L' * (tx - sx)))

    path.append('L')
    path.append(''.join('U' * (ty - sy + 1)))
    path.append(''.join('R' * (tx - sx + 1)))
    path.append('D')
    path.append('R')
    path.append(''.join('D' * (ty - sy + 1)))
    path.append(''.join('L' * (tx - sx + 1)))
    path.append('U')

    ans = ''.join(path)
    print(ans)


if __name__ == "__main__":
    main()
# encoding: utf-8

import sys
from collections import deque


class Solution:
    @staticmethod
    def doubly_linked_list():
        # write your code here
        array_length = int(input())
        _input = sys.stdin.readlines()
        task_list = list(map(lambda x: dict(action=x.split()[0], value=x.split()[-1]), _input))
        task_deque = deque()
        for task in task_list:
            action = task.get('action')
            if action == 'insert':
                task_deque.appendleft(task.get('value'))
            elif action == 'deleteFirst':
                task_deque.popleft()
            elif action == 'deleteLast':
                task_deque.pop()
            else:
                task_deque.remove(task.get('value'))

        print(" ".join(map(str, task_deque)))
        assert len(task_deque) <= array_length


if __name__ == '__main__':
    solution = Solution()
    solution.doubly_linked_list()

### FIXED CODE ###

# encoding: utf-8

import sys
from collections import deque


class Solution:
    @staticmethod
    def doubly_linked_list():
        # write your code here
        array_length = int(input())
        task_deque = deque()
        _input = sys.stdin.readlines()

        for i in range(array_length):
            l_arg = _input[i].split()
            action = l_arg[0]
            if len(l_arg) > 1:
                value = l_arg[-1]
            # print(action, 'v', value)

            if action == 'insert':
                task_deque.appendleft(value)
            elif action == 'deleteFirst':
                task_deque.popleft()
            elif action == 'deleteLast':
                task_deque.pop()
            else:
                try:
                    task_deque.remove(value)
                except Exception as e:
                    pass
        print(" ".join(task_deque))


if __name__ == '__main__':
    solution = Solution()
    solution.doubly_linked_list()
#!/usr/bin/env python3
import functools
import operator

def solve(m, k):
    if k >= 2 ** m:
        return [-1]
    if m == 1 and k == 0:
        return [0, 1, 1, 0]
    b = list(range(2 ** m))
    b.remove(k)
    if functools.reduce(operator.xor, b) != k:
        return [-1]
    a = b + [k] + list(reversed(b)) + [k]
    return a

print(*solve(*map(int, input().split())))


### FIXED CODE ###

#!/usr/bin/env python3
import functools
import operator

def solve(m, k):
    if k >= 2 ** m:
        return [-1]
    if m == 1 and k == 0:
        return [0, 1, 1, 0]
    b = list(range(2 ** m))
    b.remove(k)
    if functools.reduce(operator.xor, b, 0) != k:
        return [-1]
    a = b + [k] + list(reversed(b)) + [k]
    return a

print(*solve(*map(int, input().split())))
def resolve():
    l = int(input())
    print((l/3)**3)
resolve(9

### FIXED CODE ###

def resolve():
    l = int(input())
    print((l/3)**3)
resolve()