Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(10**9)
def myfunc(h, w, c):
    if 0<=h and h<H+2 and 0<=w and w<W+2 and T[h][w] != '#':
        if T[h][w] == '.' or T[h][w] > c:
            T[h][w] = c
            for i in [(0,1), (0,-1), (1,0), (-1,0)]:
                myfunc(h+i[0], w+i[1], c)
            for k in range(-2, 3):
                for l in range(-2, 3):
                    myfunc(h+k, w+l, T[h][w]+1)

H, W= map(int, input().split())
CH, CW= map(int, input().split())
DH, DW= map(int, input().split())
S = ['#'+input()+'#' for _ in range(H)]
S.insert(0,'#'*(W*2))
S.append('#'*(W*2))
T = [[0] * (W+2) for _ in range(H+2)]
for i in range(H+2):
    for j in range(W+2):
        T[i][j] = S[i][j]
myfunc(CH, CW, 0)
if T[DH][DW] == '#' or T[DH][DW] == '.':
    print(-1)
else:
    print(T[DH][DW])


### FIXED CODE ###

from collections import deque
H, W= map(int, input().split())
CH, CW= map(int, input().split())
DH, DW= map(int, input().split())
S = [list(map(str, input())) for _ in range(H)]
q = deque([(CH-1, CW-1, 0)])
while q:
    h, w, c = q.popleft()
    if S[h][w] == '.':
        S[h][w] = c
        for i in range(-2, 3):
            for j in range(-2, 3):
                if 0<=h+i<H and 0<=w+j<W and S[h+i][w+j] == '.':
                    if abs(i)+abs(j) == 1:
                        q.appendleft((h+i, w+j, c))
                    elif abs(i)+abs(j) >= 2:
                        q.append((h+i, w+j, c+1))
if S[DH-1][DW-1] == '.':
    print(-1)
else:
    print(S[DH-1][DW-1])
n = int(input())
    dat = list(map(int, input().split()))
    cur = dat[0]
    can = True
    for i in range(1, n):
        if dat[i] > cur:
            cur = dat[i] - 1
            continue
        if dat[i] == cur:
            continue
        can = False
    print("Yes" if can else "No")

### FIXED CODE ###

n = int(input())
dat = list(map(int, input().split()))
cur = dat[0]
can = True
for i in range(1, n):
    if dat[i] > cur:
        cur = dat[i] - 1
        continue
    if dat[i] == cur:
        continue
    can = False
print("Yes" if can else "No")
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

li = []
for i in range(len(h)):
  li.append(int(t - h[i]*0.006))
  
print(index(min(li)))

### FIXED CODE ###

n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))

li = []
for i in range(n):
  li.append(abs(a - (t - h[i]*0.006)))
  
print(li.index(min(li))+1)
N,K=[int(x) for x in input().split()]
A=[int(x) for x in input().split()]

for x in range(K,N):
  if a[x]>a[x-K]:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

N,K=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]

for x in range(K,N):
  if a[x]>a[x-K]:
    print("Yes")
  else:
    print("No")
def solve():
    def recur(i, n, total):
        # print("i, n, total", i, n, total)

        if not TABLE[i][n][total] == -1:
            # print('cache!')
            return TABLE[i][n][total]

        if not i < N:
            if n > 0 and total == A * n:
                return 1
            return 0

        ans1 = recur(i + 1, n, total)
        ans2 = recur(i + 1, n + 1, total + XS[i])

        # print(ans1, ans2)

        TABLE[i][n][total] = ans1 + ans2
        return TABLE[i][n][total]

    N, A = tuple(map(int, input().split()))
    XS = tuple(map(int, input().split()))

    TABLE = []
    for _ in range(N + 1):
        lines = [[-1 for x in range(N * 50 + 1)] for y in range(N + 1)]
        TABLE.append(lines)

    return recur(0, 0, 0)


if __name__ == '__main__':
    print(solve())


### FIXED CODE ###

args = []
for _ in range(4):
    args.append(int(input()))

N, K, X, Y = args


def solve():
    if N <= K:
        return N * X

    first = K
    second = N - first

    return first * X + second * Y

res = solve()
print(res)
dict={25:'Christmas',24:'Christmas Eve',23:'Christmas Eve Eve',22;'Christmas Eve Eve Eve'}
print(dict[input()])

### FIXED CODE ###

dict={25:'Christmas',24:'Christmas Eve',23:'Christmas Eve Eve',22:'Christmas Eve Eve Eve'}
print(dict[int(input())])
data = [
    [[0 for r in range(10)]for f in range(3)] for b in range(4)
]

# ??\??????????????????????????§????????????????????????????????????
count = int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1[f-1][r-1] += v

for b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')

        print()

    if bi < 3:
    ??????print('#'* 20)

### FIXED CODE ###

data = [
    [[0 for r in range(10)] for f in range(3)] for b in range(4)
]
 
count =int(input())
for c in range(count):
    b, f, r, v = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v
 
for bi, b in enumerate(data):
    for f in b:
        for r in f:
            print(' {0}'.format(r), end='')
 
        print()
    if bi < 3:
        print('#' * 20)
inp=list(map(int,input().split()))
S=inp[0]
B=inp[1]
R=inp[2]
if B==0:
  print(0)
else:
  ans=B+(S-B-R)
  print(ans)

### FIXED CODE ###

inp=input()
if inp=='AAA'or inp=='BBB':
  print('No')
else:
  print('Yes')
import math
from functools import reduce

n,x = map(int, input().split())
X = [int(i) for i in input().split()]
X = [abs(x-j) for j in X]
print(reduce(math.gcd, X))

### FIXED CODE ###

from fractions import gcd
from functools import reduce

n,x = map(int, input().split())
X = [int(i) for i in input().split()]
X = [abs(x-j) for j in X]
ans = reduce(gcd, X)
print(ans)
import sys
sys.setrecursionlimit(100000)

class Solution():
    def dp(self, pos, sign):
        if pos == self.n-1:
            if sign == 0:
                return +self.lst[pos]
            else:
                return -self.lst[pos]
        elif (pos, sign) in self.vis:
            return self.rcd[pos][sign]
        elif sign == 0:
            self.rcd[pos][sign] = max(self.dp(pos+1, 0) + self.lst[pos], self.dp(pos+1, 1) - self.lst[pos])
            self.vis.add((pos, sign))
            return self.rcd[pos][sign]
        else:
            self.rcd[pos][sign] = max(self.dp(pos+1, 0) - self.lst[pos], self.dp(pos+1, 1) + self.lst[pos])
            self.vis.add((pos, sign))
            return self.rcd[pos][sign]

    def run(self):
        self.n = int(input())
        self.lst = list(map(int, raw_input().split()))
        self.rcd = [[0, 0] for _ in range(self.n)]
        self.vis = set()
        print(self.dp(0, 0))

solution = Solution()
solution.run()


### FIXED CODE ###

# D - Flipping Signs
# https://atcoder.jp/contests/abc125/tasks/abc125_d

N = int(input())
A = list(map(int, raw_input().split()))

ng_cnt = 0

for i in range(N):
    if A[i] < 0:
        ng_cnt += 1
        A[i] = -A[i]

if ng_cnt % 2 == 0:
    print '{}'.format( sum(A) )
else:
    print '{}'.format( sum(A) - min(A)*2)
x = input()
print(x*x*x)




### FIXED CODE ###

x = int(input())
print(x**3)
k, s = input()
c = 0
for i range(k+1):
  x = i
  for j range(k+1):
  	y = j
    for h range(k+1):
      z = h
      sum = x + y + z
      if sum == k:
        c += 1
        
print(c)

### FIXED CODE ###

k,s=map(int,input().split())
ans=0
for x in range(k+1):
    for y in range(k+1):
        z=s-x-y
        if 0<=z<=k:
            ans+=1
print(ans)
n,k=map(int,input().split())
A=list(map(int,input().split()))
A=[0]+A
B=[]
C=[0]+[-1]*n
now_city=1
seen=set()

#【ループ回数】200000
for i in range(1,len(A)):
    now_city=A[now_city]
    #【ループ回数】B 内で now_city があるかを探索
    #if now_city in B:
        #route=B[C[now_city]-1:i-1]
    #    break
    B.append(now_city)
    C[now_city]=i
if k <= len(B):
    print(B[k-1])
else:
    k = k- len(B)
    #x = k % len(route)
    if x ==0:
        #print(route[-1])
    else:
        #print(route[x-1])

### FIXED CODE ###

n,k = map(int,input().split())
s = list(map(int,input().split()))
# print(s)
now_city = 1
s_l_city = 1
t = [0] #何回そこを通ったか
f = [0] #何回目にそこを通ったか
a=0
b = 0#サイクルありなし
f_l=0#ループの最初

#【ループ回数】200000
for i in range(n):
    t.append(0)
    f.append(-1)
# print(s)
sycle = 0
#【ループ回数】200000
for i in range(1,n+10):
    now_city = s[now_city-1]

    if t[now_city-1]==1:
        #  print(i,f[j])
         sycle=i-f[now_city-1]
         f_l=f[now_city-1]
        #  f_l=i
        #  a = 1
         b = i
        #  s_l_city=now_city
        #  print("ループの最初の数字",now_city,"最初は"+str(f_l)+"回目","周期は",sycle)
         break
    t[now_city-1]+=1
    f[now_city-1]=i
# print(t)
# print(f_l)
# print(f_l,sycle,s_l_city)

if k>b:
    # now_city=s_l_city
    for _ in range((k-f_l)%sycle):

        now_city = s[now_city-1]
    # print((k-f_l)%sycle)
    print(now_city)
else:
    # print("ループなし")
    now_city=1
    for _ in range(k):
        now_city=s[now_city-1]
    print(now_city)
N = int(input())

U = [int(input())]
for i in range(1, N):
    U.append(int(input())+U[-1])

D = map(int, input())
for i in range(N-2, -1):
    D[i] += D[i+1]

result = 0
for i in range(N):
    result = max(U[i]+D[i], result)

print(result)

### FIXED CODE ###

N = int(input())

U = list(map(int, input().split()))
for i in range(1, N):
    U[i] += U[i-1]

D = list(map(int, input().split()))
for i in range(N-2, -1, -1):
    D[i] += D[i+1]

result = 0
for i in range(N):
    result = max(U[i]+D[i], result)

print(result)
*a=map(int,input().split());print(sum(a)-max(a))

### FIXED CODE ###

*a,=map(int,input().split());print(sum(a)-max(a))
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

class SegmentTree(object):
	#N:処理する区間の長さ
	def __init__(self, N):
		self.N = N
		self.N0 = 2 ** (N - 1).bit_length()
		self.initVal = 0
		self.data = [self.initVal] * (2 * self.N0)

	# 区間クエリの種類
	def calc(self, a, b):
		return a + b

	#k番目の値をxに更新
	def update(self, k, x):
		k += self.N0 - 1
		self.data[k] = x
		while k > 0:
			k = (k - 1) // 2
			self.data[k] = self.calc(self.data[2 * k + 1], self.data[2 * k + 2])

	#区間[l, r]の演算値
	def query(self, l, r):
		L = l + self.N0; R = r + self.N0 + 1
		m = self.initVal
		while L < R:
			if R & 1:
				R -= 1
				m = self.calc(m, self.data[R - 1])
			if L & 1:
				m = self.calc(m, self.data[L - 1])
				L += 1
			L >>= 1; R >>= 1

		return m

#処理内容
def main():
	N, Q = getlist()
	c = getlist()
	LR = []
	lastappeared = [None] * N

	ans = [0] * N
	for i in range(Q):
		l, r = getlist()
		l -= 1; r -= 1
		LR.append([r, l, i])

	LR.sort()
	Seg = SegmentTree(N)
	right = 0
	for r, l, i in LR:
		while right <= r:
			if lastappeared[c[right] - 1] == None:
				Seg.update(right, 1)
			else:
				Seg.update(lastappeared[c[right] - 1], 0)
				Seg.update(right, 1)
			lastappeared[c[right] - 1] = right
			right += 1

		if l == 0:
			anspre = Seg.query(0, r)
		else:
			anspre = Seg.query(l, r)
		ans[i] = anspre

	for i in range(Q):
		print(ans[i])



if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

class SegmentTree(object):
	#N:処理する区間の長さ
	def __init__(self, N):
		self.N = N
		self.N0 = 2 ** (N - 1).bit_length()
		self.initVal = 0
		self.data = [self.initVal] * (2 * self.N0)

	# 区間クエリの種類
	def calc(self, a, b):
		return a + b

	#k番目の値をxに更新
	def update(self, k, x):
		k += self.N0 - 1
		self.data[k] = x
		while k > 0:
			k = (k - 1) // 2
			self.data[k] = self.calc(self.data[2 * k + 1], self.data[2 * k + 2])

	#区間[l, r]の演算値
	def query(self, l, r):
		L = l + self.N0; R = r + self.N0 + 1
		m = self.initVal
		while L < R:
			if R & 1:
				R -= 1
				m = self.calc(m, self.data[R - 1])
			if L & 1:
				m = self.calc(m, self.data[L - 1])
				L += 1
			L >>= 1; R >>= 1

		return m

#処理内容
def main():
	N, Q = getlist()
	c = getlist()
	LR = []
	lastappeared = [None] * N

	ans = [0] * Q
	for i in range(Q):
		l, r = getlist()
		l -= 1; r -= 1
		LR.append([r, l, i])

	LR.sort(key = lambda x:x[0])
	Seg = SegmentTree(N)
	right = 0
	for r, l, i in LR:
		while right <= r:
			itr = c[right] - 1
			if lastappeared[itr] == None:
				Seg.update(right, 1)
			else:
				Seg.update(lastappeared[itr], 0)
				Seg.update(right, 1)
			lastappeared[itr] = right
			right += 1

		if l == 0:
			anspre = Seg.query(0, r)
		else:
			anspre = Seg.query(l, r)
		ans[i] = anspre

	for i in range(Q):
		print(ans[i])



if __name__ == '__main__':
	main()
n = int(input())
a = list(map(int,input().split()))

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)

def factorial(i):
    if i == 0:
        return 1
    else:
        return factorial(i-1)*i
ans = factorial(comb1)//((factorial(p))*(factorial(comb1-p)))
if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))

comb1 = max(a)
comb2 = comb1//2
a.sort()
p = 0
keep = float("inf")
for i in range(n):
    if abs(a[i] - comb2) <= keep:
        p = a[i]
        keep = abs(a[i]-comb2)

if comb1 == p:
    print(comb1,0)
else:
    print(comb1,p)
N = int(input())
a = list(map(int, input().split()))
color = [0] * 8
for p in a:
    if p >= 3200: color[8] += 1
    else: color[p // 400] += 1
small = len([c for c in color[0:8] if c > 0])
big = small + color[8]
if not small: small += 1
print(small, big)


### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
color = [0] * 9
for p in a:
    if p >= 3200: color[8] += 1
    else: color[p // 400] += 1
small = len([c for c in color[0:8] if c > 0])
big = small + color[8]
if not small: small += 1
print(small, big)
N,M = [int(i) for i in input().split()]
submissions = {str(i):[] for i in range(1,N+1)}
AC,WA = 0,0
for i in range(M):
    P,S = [j for j in input().split()]
    submissions[P].append(S)
for i in submissions:
    for j in submissions[i]:
        if not 'AC' in j:
            break
        if j == 'AC':
            AC+=1
            break
        WA +=1
print(AC,WA)



### FIXED CODE ###

C = input()
alphs = "abcdefghijklmnopqrstuvwxyz"
print(alphs[alphs.find(C)+1])
A, B = map(int,input())

C = A- 2*B

if C >=0:
  print(C)
else:
  print(0)

### FIXED CODE ###

A, B = map(int,input().split())
 
C = A- 2*B
 
if C >=0:
  print(C)
else:
  print(0)
["L", "R", "R", "R"]N, K = map(int, input().split())
S = str(input())

counts = []
count = 0
lr = 0
rl = 0
for i in range(N - 1):#start
  z = S[i]
  if S[i] == S[i + 1]:
    count += 1
  elif (S[i] == "L") and (S[i+1] == "R"):
    lr += 1
  elif (S[i] == "R") and (S[i+1] == "L"):
    rl += 1
 
minlr = min(lr, rl)
maxlr = max(lr, rl) 
T = [S[0],S[1],S[-2],S[-1]]
U = [["L", "R", "R", "R"],["L", "R", "L", "L"],["R", "R", "L", "R"],["L", "L", "L", "R"]]
if (maxlr == 1) and (minlr == 0):
  count += 1
  if T in U:
    count -= 1
  print(count)
else:
  minK = min(K, minlr)
  count += 2 * minK
  print(count)


### FIXED CODE ###

N, K = map(int, input().split())
S = str(input())

RL = 0
for i in range(N-1):
  if S[i]=='R' and S[i+1]=='L':
    RL += 2
    
if S[0]=='L':
  RL += 1
if S[-1]=='R':
  RL += 1

ans = N - RL
ans = min(N - 1, ans + 2 * K)
print(ans)
l = list(map(int,input().split()))
task_list = sorted(l)

print(task_list[2]-task_list[0])

### FIXED CODE ###

S = input()
T = input()*2

if S in T:
    print("Yes")
else:
    print("No")
import collections
n_co = collections.Counter()
m_co = collections.Counter()

n = int(input())

for i in range(n):
	ni = input()
	n_co[ni] += 1

m = int(input())

for j in range(m):
	mi = input()
	m_co[mi] += 1

ans = (n_co - m_co).most_common(1)

print(ans[0][1])

### FIXED CODE ###

import collections
n_co = collections.Counter()
m_co = collections.Counter()

n = int(input())

for i in range(n):
	ni = input()
	n_co[ni] += 1

m = int(input())

for j in range(m):
	mi = input()
	m_co[mi] += 1

ans = (n_co - m_co)

if len(ans) == 0:
	print(0)
else:
	ans = ans.most_common(1)
	print(ans[0][1])
import sys
sys.setrecursionlimit(100000)

MAXN = 100001
memo = [-1] * MAXN


def rec_bank(n):
    ret = n
    if n == 0:
        return 0
    if memo[n] != -1:
        return memo[n]

    pow6 = 1
    while(pow6 <= n):
        ret = min(ret, rec_bank(n - pow6) + 1)
        pow6 *= 6
    pow9 = 1
    while(pow9 <= n):
        ret = min(ret, rec_bank(n - pow9) + 1)
        pow9 *= 9
    memo[n] = ret
    return ret


def main():
    N = int(input())
    print(rec_bank(N))

main()

### FIXED CODE ###

def calc(x, base):
    res = 0
    while x:
        x, m = divmod(x, base)
        res += m
    return res


def main():
    N = int(input())
    ans = min(calc(i, 6) + calc(N - i, 9) for i in range(N + 1))
    print(ans)


main()
a=[input() for i in range(h)]
b=[]
for i in a:
  if "#" in i:
    b.append(i)
for i in range(w):
  for j in range(len(b)):
    if b[j][i] == "#":
      break
    elif j == len(b)-1:
      for k in range(len(b)):
        print(b[k][:i],b[k][i+1:],sep="")

### FIXED CODE ###

h,w = map(int,input().split())
a=[list(input()) for i in range(h)]
b=[]
dl=[]
for i in a:
  if "#" in i:
    b.append(i)
for j in range(w):
  for i in range(len(b)):
    if b[i][j] == "#":
      break
    elif i == len(b)-1:
      dl.append(j)
dl.sort(reverse=True)
for i in dl:
  for j in range(len(b)):
    del b[j][i]
for c in b:
  print(*c,sep="")
b_list = [int(input() for i in range(int(input())))]
r_list = [int(input() for i in range(int(input())))]

ans = 0 
for i in list(set(b_list)):
  s = b_list.count(i) - r_list.count(i)
  if ans <= s:
    ans = s
    
print(ans)


### FIXED CODE ###

b_list = [input() for i in range(int(input()))]
r_list = [input() for i in range(int(input()))]

ans = 0 
for i in list(set(b_list)):
  if ans <= b_list.count(i) - r_list.count(i):
    ans = b_list.count(i) - r_list.count(i)
    
print(int(ans))
s = input()
x,y = map(int,input().split())
#%%
mx = []
my = []
mx2 = []
my2 = []


cnt = 0
it = 0
for t in s:
    if t == 'T':
        if cnt:
            if it%2==0:
                mx.append(cnt)
                mx2.append(cnt*2)
            else:
                my.append(cnt)
                my2.append(cnt*2)
        it += 1
        cnt = 0
    else:
        cnt += 1
    
if it%2==0:
    mx.append(cnt)
    mx2.append(cnt*2)
else:
    my.append(cnt)
    my2.append(cnt*2)
    
        
dx = sum(mx)-x
dy = sum(my)-y


# dp[i+1][j] : i個目までの要素の和でjを作れるか？

MAX = max(sum(mx2),sum(my2)) + 10
dpx = [[False]*MAX for _ in range(len(mx2)+1)]
dpy = [[False]*MAX for _ in range(len(my2)+1)]

dpx[0][0] = True
dpy[0][0] = True

for i in range(len(mx2)):
    for j in range(MAX):
        if j<mx2[i]:
            dpx[i+1][j] = dpx[i][j]
        else:
            dpx[i+1][j] = dpx[i][j-mx2[i]] or dpx[i][j]

for i in range(len(my2)):
    for j in range(MAX):
        if j<my2[i]:
            dpy[i+1][j] = dpy[i][j]
        else:
            dpy[i+1][j] = dpy[i][j-my2[i]] or dpy[i][j]


if dx<0 or dy<0:
    print('No')

else:
    if dpx[len(mx2)][dx] and dpy[len(my2)][dy]:
        print('Yes')
    else:
        print('No')
        









### FIXED CODE ###

s = input()
x,y = map(int,input().split())
#%%
mx = []
my = []
mx2 = []
my2 = []


cnt = 0
it = 0
firstFlag = (s[0]=='F')
for t in s:
    if t == 'T':
        
        
        if cnt:
            if it%2==0:
                mx.append(cnt)
                mx2.append(cnt*2)
            else:
                my.append(cnt)
                my2.append(cnt*2)
        it += 1
        cnt = 0
    else:
        cnt += 1
    
if it%2==0:
    mx.append(cnt)
    mx2.append(cnt*2)
else:
    my.append(cnt)
    my2.append(cnt*2)

if firstFlag:
    x -= mx[0]
    mx[0] = 0
    mx2[0] = 0
        
dx = sum(mx)-x
dy = sum(my)-y


# dp[i+1][j] : i個目までの要素の和でjを作れるか？

MAX = max(sum(mx2),sum(my2)) + 10
dpx = [[False]*MAX for _ in range(len(mx2)+1)]
dpy = [[False]*MAX for _ in range(len(my2)+1)]

dpx[0][0] = True
dpy[0][0] = True

for i in range(len(mx2)):
    for j in range(MAX):
        if j<mx2[i]:
            dpx[i+1][j] = dpx[i][j]
        else:
            dpx[i+1][j] = dpx[i][j-mx2[i]] or dpx[i][j]

for i in range(len(my2)):
    for j in range(MAX):
        if j<my2[i]:
            dpy[i+1][j] = dpy[i][j]
        else:
            dpy[i+1][j] = dpy[i][j-my2[i]] or dpy[i][j]



if dx<0 or dy<0:
    print('No')

elif dx>sum(mx2) or dy>sum(my2):
    print('No')

else:
    if dpx[len(mx2)][dx] and dpy[len(my2)][dy]:
        print('Yes')
    else:
        print('No')
import sympy as sym
(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) = sym.symbols('a b c d e f g h i j k l m n o p q r s t u v w x y z')

N = int(input())
A = sym.sequence((N*(N+1))/2,(n, 1, 100))
print([type(N), N for in A])

### FIXED CODE ###

N = int(input())

print(int(N*(N+1)/2))
x =(input(x))
s=x*x*x
print(s)


### FIXED CODE ###

x = int(input())
print(x*x*x)
a, b = input().split()
 
c = a*b / 2
 
if c == 0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

i = list(map(int, input().split()))

c = i[0] * i[1]

ans = 'Even' if c % 2 == 0 else 'Odd'
print(ans)
import re
m = re.match(r'A.*Z', input())
print(m.end() - m.start())

### FIXED CODE ###

import re
m = re.search(r'A.*Z', input())
print(m.end() - m.start())
n = int(input())
s = input()
if n % 2 == 1:
  print("No")

if s[0:n/2] == s[n/2:]:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

n = int(input())
s = input()
if n % 2 == 1:
  print("No")
else:
	if s[0:n//2] == s[n//2:]:
  		print("Yes")
	else:
  		print("No")
a,b = map(int,input().split())

res = b // a + 1

if a == b:
  res = 1
  
print(res)


### FIXED CODE ###

s = input()
t = input()
count = 0

for i in range(3):
  if s[i] == t[i]:
    count += 1

print(count)
import math
print(math.factorial(int(input()) % (10**9+7))

### FIXED CODE ###

import math
print(math.factorial(int(input())) % (10**9+7))
def alf(st):
  if st == 1:
    return "a"
  if st == 2:
    return "b"
  if st == 3:
    return "c"
  if st == 4:
    return "d"
  if st == 5:
    return "e"
  if st == 6:
    return "f"
  if st == 7:
    return "g"
  if st == 8:
    return "h"
  if st == 9:
    return "i"
  if st == 10:
    return "j"
  if st == 11:
    return "k"
  if st == 12:
    return "l"
  if st == 13:
    return "m"
  if st == 14:
    return "n"
  if st == 15:
    return "o"
  if st == 16:
    return "p"
  if st == 17:
    return "q"
  if st == 18:
    return "r"
  if st == 19:
    return "s"
  if st == 20:
    return "t"
  if st == 21:
    return "u"
  if st == 22:
    return "v"
  if st == 23:
    return "w"
  if st == 24:
    return "x"
  if st == 25:
    return "y"
  if st == 0:
    return "z"
   
N,=list(map(int, input().split()))
li = []
NN = N
count=1
while True:
  li+=[NN%26]
  NN = NN//26
  if NN <26:
    if NN%26!=0:
      li.append(NN%26)
    break
  count+=1
  if count>1000000000000001:
    print("error")
    exit()
#print(li)
for i in range(len(li)-1):
  if li[i]== 0:
    li[i+1]-=1
#print(li)
if(li[len(li)-1])==0:
  li.pop() 
re=[alf(i) for i in li]
re.reverse()
print("".join(re))

### FIXED CODE ###

def alf(st):
  if st == 0:
    return "a"
  if st == 1:
    return "b"
  if st == 2:
    return "c"
  if st == 3:
    return "d"
  if st == 4:
    return "e"
  if st == 5:
    return "f"
  if st == 6:
    return "g"
  if st == 7:
    return "h"
  if st == 8:
    return "i"
  if st == 9:
    return "j"
  if st == 10:
    return "k"
  if st == 11:
    return "l"
  if st == 12:
    return "m"
  if st == 13:
    return "n"
  if st == 14:
    return "o"
  if st == 15:
    return "p"
  if st == 16:
    return "q"
  if st == 17:
    return "r"
  if st == 18:
    return "s"
  if st == 19:
    return "t"
  if st == 20:
    return "u"
  if st == 21:
    return "v"
  if st == 22:
    return "w"
  if st == 23:
    return "x"
  if st == 24:
    return "y"
  if st == 25:
    return "z"
   
def cc():
  N,=list(map(int, input().split()))
  li = [0 for i in range(100)]
  NN = N
  count=1
  for i in range(1,100):
    if NN > 26 ** i:
      NN = NN - 26 ** i
    else:
      l=i
      break; 
  NN-=1
  count=0
  while True:
    li[count]=NN%26
    count+=1
    NN //=26
    if NN <26:
      li[count]=NN%26
      break    
  re=[alf(i) for i in li[:l]]
  re.reverse()
  print("".join(re))

cc()
print((L/3)**3)

### FIXED CODE ###

L=int(input())
print((L/3)**3)