Harryxun/stf_run huggingface dataset:
import sys


class Paper:
    def __init__(self):
        self.paper = [[0 for x in range(10)] for y in range(10)]

    def white_space(self):
        s = 0
        for x in range(10):
            for y in range(10):
                if self.paper[x][y] == 0:
                    s += 1
        return s

    def most_dark(self):
        s = 0
        for x in range(10):
            for y in range(10):
                if self.paper[x][y] > s:
                    s = self.paper[x][y]
        return s

    def drop(self, x, y, size):
        r = []
        if size == 1:
            r.append((x,y))
            r.append((x-1,y))
            r.append((x+1,y))
            r.append((x,y-1))
            r.append((x,y+1))
        elif size == 2:
            r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
        elif size == 3:
            r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
            r.append((x-2, y))
            r.append((x+2, y))
            r.append((x, y-2))
            r.append((x, y+2))
        else:
            pass
        r = filter(self.out_of_paper, r)
        try:
            for p in r:
                self.paper[p[0]][p[1]] += 1
        except:
            pass
        return self

    def out_of_paper(p):
        if p[0] >= 0 and p[1] >= 0:
            True
        else:
            False


#input_file = open(sys.argv[1], 'r')

paper = Paper()
for line in sys.stdin:
    (x, y, size) = tuple(map(int, line.split(',')))
    paper.drop(x, y, size)
print paper.white_space()
print paper.most_dark()

### FIXED CODE ###


import sys


class Paper:
    def __init__(self):
        self.paper = [[0 for x in range(10)] for y in range(10)]

    def white_space(self):
        s = 0
        for x in range(10):
            for y in range(10):
                if self.paper[x][y] == 0:
                    s += 1
        return s

    def most_dark(self):
        s = 0
        for x in range(10):
            for y in range(10):
                if self.paper[x][y] > s:
                    s = self.paper[x][y]
        return s

    def drop(self, x, y, size):
        r = []
        if size == 1:
            r.append((x,y))
            r.append((x-1,y))
            r.append((x+1,y))
            r.append((x,y-1))
            r.append((x,y+1))
        elif size == 2:
            r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
        elif size == 3:
            r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
            r.append((x-2, y))
            r.append((x+2, y))
            r.append((x, y-2))
            r.append((x, y+2))
        else:
            pass
#        print r
        r = filter(self.out_of_paper, r)
#        print r
        try:
            for p in r:
                self.paper[p[0]][p[1]] += 1
        except:
            pass
        return self

    def out_of_paper(self, p):
        if 0 <= p[0] < 10 and 0 <= p[1] < 10:
            return True
        else:
            return False



paper = Paper()
for line in sys.stdin:
    (x, y, size) = tuple(map(int, line.split(',')))
    paper.drop(x, y, size)
print paper.white_space()
print paper.most_dark()
N = int(input())
xyh = [tuple(int(i) for i in input().split()) for i in range(N)]


def H(cx, cy, x, y, h):
    return h + abs(x - cx) + abs(y - cy)


def g(l, cx, cy):
    H_max_l = set(H(cx, cy, x, y, h) for x, y, h in xyh if h == 0)
    h_max = min(H_max_l) if any(H_max_l) else 10**9
    
    TH = set(H(cx, cy, x, y, h) for x, y, h in l if h > 0)
    if len(TH) == 1:
        high = TH.pop()
        if high <= h_max:
            return high
    return -1


def f(l):
    for cx in range(0, 101):
        for cy in range(0, 101):
            h = g(l, cx, cy)
            if h > 0:
                return cx, cy, h

cx, cy, h = f(xyh)
print(cx, cy, h)


### FIXED CODE ###

N = int(input())
xyh = [tuple(int(i) for i in input().split()) for i in range(N)]


def H(cx, cy, x, y, h):
    return h + abs(x - cx) + abs(y - cy)


def g(l, cx, cy):
    H_max_l = set(H(cx, cy, x, y, h) for x, y, h in l if h == 0)
    h_max = min(H_max_l) if any(H_max_l) else -1
    
    TH = set(H(cx, cy, x, y, h) for x, y, h in l if h > 0)
    if len(TH) == 1:
        high = TH.pop()
        if h_max == -1 or high <= h_max:
            return high
    return -1


def f(l):
    for cx in range(0, 101):
        for cy in range(0, 101):
            h = g(l, cx, cy)
            if h > 0:
                return cx, cy, h

cx, cy, h = f(xyh)
print(cx, cy, h)
n, m = map(int ,input().split())

adj = [[] for _ in range(m)]

for i in range(m):
    a, b = map(int, input().split())
    a-=1
    b-=1
    adj[a].append(b)
    adj[b].append(a)

from collections import deque
q = deque()

dist = [-1] * n
ans = [0] * n

q.append(0)
while len(q) != 0:
    now = q.popleft()
    for to in adj[now]:
        if dist[to] != -1:continue
        dist[to] = dist[now] + 1
        q.append(to)
        ans[to] = now 
    
print("Yes")
for i in range(1, n):
    print(ans[i] + 1)

### FIXED CODE ###

n, m = map(int ,input().split())
 
adj = [[] for _ in range(n)]
 
for i in range(m):
    a, b = map(int, input().split())
    a-=1
    b-=1
    adj[a].append(b)
    adj[b].append(a)
 
from collections import deque
q = deque()
 
dist = [-1] * n
ans = [0] * n
 
q.append(0)
while len(q) != 0:
    now = q.popleft()
    for to in adj[now]:
        if dist[to] != -1:continue
        dist[to] = dist[now] + 1
        q.append(to)
        ans[to] = now
 
print("Yes")
for i in range(1, n):
    print(ans[i] + 1)
d,t,s=map(int,input().split())
if s*t >= d:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

x=int(input())
if x==0:
  print("1")
else:
  print("0")
s = input()
t = input()

sl = list(s)
tl = list(t)

count = 0

for a, b in sl, tl:
  if a!=b:
    count++
    
print(count)

### FIXED CODE ###

s = input()
t = input()

sl = list(s)
tl = list(t)

count = 0

for (a, b) in zip(sl, tl):
  if a!=b:
    count+=1
    
print(count)
S=input()
AB=int(S[:2])
CD=int(S[2:])
if 1=< AB =<12 and 1 <= CD <= 12:
    print('AMBIGUOUS')
elif (AB=0 or AB=>13) and (1<=CD<=12):
    print('YYMM')
elif (1<=AB<=12) and (CD=0 or CD=>13):
    print('MMYY')
else:
    print('NA')

### FIXED CODE ###

S=input()
AB=int(S[:2])
CD=int(S[2:])
if  (1<=AB<=12) and  (1<=CD<=12):
    print('AMBIGUOUS')
elif (AB==0 or AB>=13) and  (1<=CD<=12):
    print('YYMM')
elif (1<=AB<=12) and (CD==0 or CD>=13):
    print('MMYY')
else:
    print('NA')
i = 1
while True :
	n = input()
	if n==0 :
		break
	else :
	print('Case %d: %d' % (i,n)
	i += 1

### FIXED CODE ###

i = 1
while True :
	n = input()
	if n==0 :
		break
	else :
		print 'Case %d: %d' % (i,n)
	i += 1
n = int(input())
a = [int(input()) for i in range(n)]
count = 0
i = 0
ans = False
while count < N:
    count += 1
    if a[i] == 2:
        ans = True
        break
    else:
        i = a[i] - 1
if ans == True:
    print(count)
else:
    print("-1")

### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(n)]
ans = False
used = set()
i = 1
count = 0
while ans == False:
    count += 1
    if a[i-1] == 2:
        ans = True
    elif i-1 in used:
        break
    else:
        used.add(i-1)
        i = a[i-1]
if ans == True:
    print(count)
else:
    print("-1")
import numpy as np

N=int(input())
Rain = np.array(list(map(int,input().split())))
Rain = np.reshape(Rain,(N,1))

n1 = np.ones(N)
n2 = np.ones(N-1)


a = np.diag(n1)
b = np.diag(n2,k=1)
c = a+b
print('u')
"""
c[N-1][0] = 1
d = 0.5 * c

ans = np.linalg.solve(d,Rain)
for i in ans:
    print(int(i[0]),end=' ')
"""


### FIXED CODE ###

N=int(input())
a = list(map(int,input().split()))
S = sum(a)
S1 = 0
for i in range(N):
    if i%2 == 1:
        S1 += a[i]
b = [0 for i in range(N)]
b[0] = S - 2*S1
print(b[0],end=' ')
for j in range(1,N):
    b[j] = 2*a[j-1] - b[j-1]
    print(b[j],end=' ')
a,b,c = map(int, input().split())
　org_list =[a, b, c]
　org_list.sort()
print(org_list)


### FIXED CODE ###

a, b, c = map(int, input().split())
 
if a<b and a<c:
    if b<c :
        print(a, b, c)
    else :
        print(a, c, b)
elif b<a and b<c :
    if a<c :
        print(b, a, c)
    else :
        print(b, c, a)
else :
    if a<b :
        print(c, a, b)
    else :
        print(c, b, a)
N, M = map(int, input().split())
#N = 1
#M = 1
l1 = []
l2 = []
ans = 0
rest = M
for i in range(N):
	temp1, temp2 = map(int, input().split())
	#temp1 = 1
	#temp2 = 1
	l1.append(temp1)
	l2.append(temp2)

while True:
	min_index = l1.index(min(l1))
	if rest >= l2[min_index]:
		ans += (min(l1) * l2[min_index])
		rest -= l2[min_index]
	else:
		ans += (min(l1) * rest)
		break
	l1.pop(min_index)

print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
X = []
for i in range(N):
    X.append(list(map(int, input().split())))
X.sort(key=lambda x: x[0])
i = 0
num = 0
ans = 0
while i <= N - 1:
    num += X[i][1]
    ans += X[i][0] * X[i][1]
    if num > M:
        ans -= X[i][0] * (num - M)
        break
    i += 1
print(ans)
import collections
n = int(raw_input())

adj = collections.defaultdict(list)

for _ in range(n - 1):
	u, v, w = map(int, raw_input().split(' '))
	adj[u].append((v,w))
	adj[v].append((u,w))

q,h = collections.deque([(1,0)]), { 1:0 }
def dfs(u, h, adj):
	for v,w in adj[u]:
		if v not in h:
			h[v] = (1- h[u]) if (w % 2) else h[u]
			dfs(v, h, adj)
dfs(1, h, adj)
for node in range(1, n + 1): 
	print h[node]

### FIXED CODE ###

import collections
n = int(raw_input())

adj = collections.defaultdict(list)

for _ in range(n - 1):
	u, v, w = map(int, raw_input().split(' '))
	adj[u].append((v,w))
	adj[v].append((u,w))


q = collections.deque([(1,0)])
h = { 1:0 }
while(q):
	u,c = q.popleft()
	for v,w in adj[u]:
		if v not in h:
			h[v] = (1- c) if (w % 2) else c
			q.append((v,h[v]))

for node in range(1, n + 1): 
	print h[node]
import math

N = int(input())

rep = int(math.floor(math.log(N,5)))
r=0
for i in range(rep):
  q = 5**(i+1)
  if (N//q)%2==0:
    w = (N//q)//2
  else :
    w = ((N-1)//q)//2
  r+=w

if N%2==1:
  r=0

print(r)

### FIXED CODE ###

import math

N = int(input())

if N==0:
  r=0
elif N%2==1:
  r=0
else:
  rep = int(math.floor(math.log(N,5)))
  r=0
  for i in range(rep):
    q = 5**(i+1)
    if (N//q)%2==0:
      w = (N//q)//2
    else :
      w = ((N-1)//q)//2
    r+=w


print(r)
can = list(map(int,input().split()))

#list 並び替え→最初と最後足して == 真ん中　ならばYES!!!

can = can.sort()

if can[0]+can[2] == can[1]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###


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

#list 並び替え→最初と最後足して == 真ん中　ならばYES!!!

can.sort()

if can[0]+can[1] == can[2]:
    print("Yes")
else:
    print("No")
import sys

for v in sys.stdin
    a,op,b = v.split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a/b)
    elif op == '?':
        break

### FIXED CODE ###

import sys

for v in iter(sys.stdin.readline,""):
    a,op,b = v.split()
    a = int(a)
    b = int(b)
    if op == '+':
        print(a+b)
    elif op == '-':
        print(a-b)
    elif op == '*':
        print(a*b)
    elif op == '/':
        print(a/b)
    elif op == '?':
        break
X=int(input())
    A=int(input())
    B=int(input())
    a=X-A
    b=int(a/B)
    print(a-b*B)

### FIXED CODE ###

X=int(input())
A=int(input())
B=int(input())
a=X-A
b=int(a/B)
print(a-b*B)
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

# GCD -- START --
def gcd(x,y):
  while y:
    x,y=y,x%y
  return x
# GCD --- END ---

# LCM -- START --
def lcm(x,y):
  return x*y//gcd(x,y)
# LCM --- END ---

def main():
  # X=ak(p+0.5)
  #  =ak*p+0.5*ak
  # akとpは整数よりak*pは整数
  # 0.5*akが整数になるにはakは偶数（制約の指定もあり）
  # X=(ak/2)*(2p+1)
  # 2p+1は奇数なのでXとak'の2で割れる回数は一致する
  # 2で割れる回数が一致しない例
  # 6と8なら
  # 6,3,9,15,21,27,...
  # 8,4,12,20,28,36,...
  # 一致しない
  # 全体を2^tで割れる（割れないなら0）
  # X'=(ak/2)'*(2p+1)
  # (X'=X/(2^t),(ak/2)'=(ak/2)/(2^t))
  # M/(2^t)以下で
  # (ak/2)'の公倍数を奇数倍したものが何個あるかを数える

  n,m=LI()
  m/=2
  _l=LI()
  l=[x//2 for x in _l]

  a=l[0]
  x=0
  while True:
    if a%(2**x)!=0:
      x-=1
      break
    x+=1

  c=2**x
  for i in range(n):
    b=l[i]
    if b%c!=0 or b%(c*2)==0:
      # print(b,c)
      return 0

    l[i]=b//c

  _lcm=l[0]
  for x in l[1:]:
    _lcm=lcm(_lcm,x)

  # print(m,_lcm)
  return math.ceil(m/_lcm)

# main()
print(main())


### FIXED CODE ###

# https://atcoder.jp/contests/abc150/tasks/abc150_d
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

# GCD -- START --
def gcd(x,y):
  while y:
    x,y=y,x%y
  return x
# GCD --- END ---

# LCM -- START --
def lcm(x,y):
  return x*y//gcd(x,y)
# LCM --- END ---

def f(x):
  a=0
  while x%2==0:
    x//=2
    a+=1
  return a

def main():
  n,m=LI()
  _l=LI()
  l=[x//2 for x in _l]

  t=f(l[0])
  for i in range(n):
    b=l[i]
    if t!=f(b):
      return 0
    l[i]>>=t
  m>>=t

  _lcm=1
  for x in l:
    _lcm=lcm(_lcm,x)
    if _lcm>m:
      return 0

  # print(m,_lcm)
  m//=_lcm
  return (m+1)//2

# main()
print(main())
import sys
input = sys.stdin.readline
k, q = map(int, input().split())
d = list(map(int, input().split()))
query = [list(map(int, input().split())) for i in range(q)]
ans = []
for n, x, m in query:
    l = [d[i]%m for i in range(k)]
    n -= 1
    zero = l.count(0)
    count = n // k
    zero_total = zero*count
    total = sum(l)*count + x%m
    rem = n % k
    total += sum(l[:rem])
    zero_total += l[:rem].count(0)
    ans.append(n-total//m-zero_total)
print("\n".join(ans))


### FIXED CODE ###

import sys
input = sys.stdin.readline
k, q = map(int, input().split())
d = list(map(int, input().split()))
query = [None]*q
for i in range(q):
    query[i] = list(map(int, input().split()))

def answer_query(n, x, m):
    l = [m if i%m == 0 else i%m for i in d]
    count = n // k
    rem = n % k
    s = sum(l)
    total = s%m * count + x%m
    for i in range(rem):
        total += l[i]

    total //= m
    total += s//m * count

    print(n-total)


for n, x, m in query:
    answer_query(n-1, x, m)
N=int(input())
n=N-1
for i in range(1,int(N**(1/2))+1):
    if N%i==0:
      n=min(n,i+N/i-2)
print(int(n))

### FIXED CODE ###

a,b=map(int,input().split())
if a>9 or b>9:
  print(-1)
else:
  print(a*b)
N = int(input())
robots = []
for _ in range(N):
    x, l = map(int, input().split())
    robots.append((x, l))

robots = sorted(robots, key=lambda x: x[0])
rightest_point = robots[0][0] + robots[0][1] - 1
ans = 0
# 無理やり一体目を置いた時
for i in range(1, len(robots)):
    if robots[i][0]-robots[i][1] + 1 < rightest_point:
        ans += 1
        continue
    else:
        rightest_point = robots[i][0]+robots[i][1] - 1
first = N-ans

# 1体目を置かない場合
rightest_point = robots[1][0] + robots[1][1] - 1
ans = 0
for i in range(2, len(robots)):
    # print("rightest_point: ", rightest_point)
    if robots[i][0]-robots[i][1] + 1 < rightest_point:
        ans += 1
        continue
    else:
        rightest_point = robots[i][0]+robots[i][1] - 1
# print("rightest_point: ", rightest_point)
second = N-ans-1
print(max(first, second))


### FIXED CODE ###

N = int(input())
robots = []
for _ in range(N):
    x, l = map(int, input().split())
    robots.append((x-l, x+l))

robots.sort(key=lambda x: x[1])  # 終端を昇順ソート
# print(robots)
cnt = 0
last = -10**18  # 最初、最右のものははるか左側にあると考える
for left, right in robots:
    if left >= last:  # 残せるのであれば
        cnt += 1
        last = right
print(cnt)
inf = float('inf')

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

# 累積min/max
cmin = [0] * (N+1)
cmax = [0] * (N+1)
resmin = inf
resmax = -inf
for i, a in enumerate(A):
    resmin = min(resmin, a)
    resmax = max(resmax, a)
    cmin[i+1] = resmin
    cmax[i+1] = resmax

# 正負の境界を全探索 -[0,k) +[k, N)
for k in range(N):
    ans = []
    cnt = 0
    m = cmin[k]
    M = cmax[N] - cmax[k]
    flag = True

    if m > 0:
        for i, a in enumerate(A):
            res = max(-(a // m), 0)
            cnt += res
            if cnt > 2*N:
                flag = False
                break
            for _ in range(res):
                x = A.index(m)
                y = i
                ans.append((x, y))

    if not flag:
        continue

    if M > 0:
        for i, a in enumerate(A):
            res = max(-(a // M), 0)
            cnt += res
            if cnt > 2*N:
                flag = False
                break
            for _ in range(res):
                x = A.index(M)
                y = i
                ans.append((x, y))
    
    if not flag:
        continue

    for i in range(k-1, 0, -1):
        ans.append((i, i-1))
        cnt += 1
    
    for i in range(k, N-1):
        ans.append((i, i+1))
        cnt += 1
    
    if cnt < 2*N:
        print(cnt)
        for x, y in ans:
            print(x, y)
        exit()

### FIXED CODE ###

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

M = max(A)
Mi = A.index(M)
m = min(A)
mi = A.index(m)

cnt = 0
ans = []

if M > 0 and m < 0:
    if abs(m) <= abs(M):
        for i in range(N):
            if Mi == i:
                continue
            x = Mi
            y = i
            A[y] += A[x]
            ans.append((x, y))
            cnt += 1
    else:
        for i in range(N):
            if mi == i:
                continue
            x = mi
            y = i
            A[y] += A[x]
            ans.append((x, y))
            cnt += 1

M = max(A)
m = min(A)

if m >= 0:
    for i in range(N-1):
        x = i
        y = i+1
        A[y] += A[x]
        ans.append((x, y))
        cnt += 1
else:
    for i in range(N-1, 0, -1):
        x = i
        y = i-1
        A[y] += A[x]
        ans.append((x, y))
        cnt += 1

print(cnt)
for x, y in ans:
    print(x+1, y+1)
n,q=map(int,input().split())
s=list(input())
#print(s)
i=0
a=[]
while i!=len(s):
    if s[i]=="C" and a1==1:

        a.append(1)
        a1=0
    elif s[i]=="A":
        a.append(0)
        a1=1
    else:
        a1=0
        a.append(0)
    i=i+1
#print(a)
i=0
while i!=q:
    l,r=map(int,input().split())
    i=i+1
    s=a[l:r]
    #print(s)
    print(s.count(1))

### FIXED CODE ###

n,q=map(int,input().split())
s=list(input())
#print(s)
i=1
a=[0]
x=0
while i!=n:
    if s[i-1]=="A":
        if s[i]=="C":
            x=x+1
    i=i+1
    a.append(x)

#print(a)
i=0
while i!=q:
  try:
    l,r=map(int,input().split())
    i=i+1
    s=a[r-1]-a[l-1]
    print(s)
  except:
      break
A=int(input())
B=int(input())
 
if 1<=A<=9 and 1<=B<=9:
  print(A*B)
else:
  print('-1')

### FIXED CODE ###

i = list(map(int, input().split()))
 #出力：['s_1', 's_2']
A=i[0] #出力：s_1
B=i[1] #出力：s_2

if A<=9 and B<=9:
  print(A*B)
else:
  print(-1)
k=int(input())
s=input()

mod=10**9+7

import sys
sys.setrecursionlimit(2147483647)

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p
p = mod #割る数
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

ans=0

for i in range(k+1):
    ans = (ans+cmb(max(0,len(s)-1+k-i), k-i,mod)*pow(26,i,mod)*pow(25,k-i,mod)) % mod

    #print(end,len(s)+k-end,ans,cmb(end,len(s),mod),pow(25,end-len(s),mod),pow(26,len(s)+k-end,mod))

print(ans%mod)





### FIXED CODE ###

k=int(input())
s=input()

mod=10**9+7

import sys
sys.setrecursionlimit(10**9)

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p
p = mod #割る数
N = 2*(10 ** 6)  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

ans=0

for i in range(k+1):
    ans = (ans+cmb(i+len(s)-1,i,mod)*pow(26,k-i,mod)*pow(25,i,mod)) % mod

    #print(end,len(s)+k-end,ans,cmb(end,len(s),mod),pow(25,end-len(s),mod),pow(26,len(s)+k-end,mod))

print(ans%mod)
so=input()
se=input()
sol=list(so)
sel=list(se)
i=0
while i<len(sol) or i<len(sel):
    s.append(sol[i])
    s.append(sel[i])
    i=i+1
print "".join(s)

### FIXED CODE ###

a,b,c=(int(i) for i in input().split())
if b-a==c-b:
    print("YES")
else:
    print("NO")
dic = {}

def getX(x, y, cards, idx):
    if len(cards)==1:
        return abs(cards[0]-y)
    lgst = 0
    tmpcards = cards.copy()
    for ex, i in enumerate(cards):
        if(ex==len(cards)-1):
            return max(abs(i-y),lgst)
        tmpcards.remove(i)
        idx += 1
        if (i,y,idx) in dic:
            tmp = dic[(i,y,idx)]
        else:
            tmp = getY(i, y, tmpcards, idx)
            dic[(i,y,idx)]= tmp
        if tmp > lgst:
            lgst = tmp
    return lgst

def getY(x, y, cards, idx):
    if len(cards)==1:
        return abs(cards[0]-x)
    smlst = 0
    tmpcards = cards.copy()
    for ex, i in enumerate(cards):
        if (ex==len(cards)-1):
            return min(abs(i - x), smlst)
        tmpcards.remove(i)
        idx += 1
        if (x,i,idx) in dic:
            tmp = dic[(x,i,idx)]
        else:
            tmp = getX(x, i, tmpcards, idx)
            dic[(x,i,idx)]= tmp
        if tmp < smlst:
            smlst = tmp
    return smlst

n, z, w = map(int, input().split())
cards = list(map(int, input().split()))
print(getX(z, w, cards, 0))

### FIXED CODE ###

n, z, w = map(int, input().split())
cards = list(map(int, input().split()))
#print(getX(z, w, cards, 0))
if(abs(cards[len(cards)-1]-w)>abs(cards[len(cards)-1]-cards[len(cards)-2])):
    print(abs(cards[len(cards)-1]-w))
else:
    print(abs(cards[len(cards)-1]-cards[len(cards)-2]))
import sys

S = input()

# S = 'akasaka'

N = len(S)
N_sub = int((N - 1)/2)

S_rev = S[::-1]
if S != S_rev:
    print('No')
    sys.exit(1)

sub_S = S[:N_sub]
sub_S_rev = sub_S[::-1]
if sub_S != sub_S_rev:
    print('No')
    sys.exit(1)

print('Yes')

### FIXED CODE ###

import sys

S = input()

# S = 'akasaka'

N = len(S)

S_rev = S[::-1]
if S != S_rev:
    print('No')
    sys.exit(0)

sub_S = S[:int((N - 1)/2)]
sub_S_rev = S[int((N + 3)/2)-1:]
if sub_S != sub_S_rev:
    print('No')
    sys.exit(0)

print('Yes')
import math
def main():
    n, m = map(int, input().split())
    s = input()
    t = input()
    x = [' '] * n*m
    for i in range(n):
        x[i*m] = s[i]
    for i in range(m):
        if x[i*n] == ' ':
            continue
        if x[i*n] != t[i]:
            print(-1)
            return
    print(n * m // math.gcd(n, m))

if __name__ == '__main__':
    main()

### FIXED CODE ###

import fractions


def main():
    n, m = map(int, input().split())
    s = input()
    t = input()
    l = n * m // fractions.gcd(n, m)
    x = {}
    for i in range(n):
        x[i * (l // n)] = s[i]
    for i in range(m):
        if i * (l // m) not in x:
            continue
        if x[i * (l // m)] != t[i]:
            print(-1)
            return
    print(l)


if __name__ == '__main__':
    main()
import math
print(int(input()*math.pi*2))

### FIXED CODE ###

import math
N = int(input())
print(2*math.pi*N)