Harryxun/stf_run huggingface dataset:
n = int(input())
cards = [[0 for i in range(13)] for j in range(4)]
s2n = {'S': 0, 'H': 1, 'C': 2, 'D': 3}
n2s = 'SHCD'
n = int(input())
for i in range(n):
    card = list(input().split())
    card[1] = int(card[1])
    if card[0] == 'S':
        suit = 0 
    elif card[0] == 'H':
        suit = 1 
    elif card[0] == 'C':
        suit = 2 
    elif card[0] == 'D':
        suit = 3 
    cards[suit][card[1]-1] = 1
for i in range(4): 
    for j in range(13):
        if not(cards[i][j]):
            print(n2s[i], j+1)

### FIXED CODE ###

cards = [[0 for i in range(13)] for j in range(4)]
s2n = {'S': 0, 'H': 1, 'C': 2, 'D': 3}
n2s = 'SHCD'
n = int(input())
for i in range(n):
    card = list(input().split())
    card[1] = int(card[1])
    cards[s2n[card[0]]][card[1]-1] = 1
for i in range(4): 
    for j in range(13):
        if not(cards[i][j]):
            print(n2s[i], j+1)
#S, L, h
import math
a, b, C = map(int, input().split())

S = a*b*math.sin(C*math.pi/180)*(1/2)
L = a+b+math.sqrt(a*a+b*b-2*a*b*math.cos(C*math.pi/180))
h = 2*S/a

print('%.4f %.4f %.4f '% s, L, h)

### FIXED CODE ###

#S, L, h
import math
a, b, C = map(int, input().split())

S = a*b*math.sin(C*math.pi/180)*(1/2)
L = a+b+math.sqrt(a*a+b*b-2*a*b*math.cos(C*math.pi/180))
h = 2*S/a

print('%.4f'% S)
print('%.4f'% L)
print('%.4f'% h)
import math
def lcm(a,b):
    return(int(a*b/math.gcd(a,b)))

n = int(input())
a = list(map(int,input().split()))
least_common_multiple = 1
for i in range(n):
    least_common_multiple = lcm(least_common_multiple,a[i])
ans = 0
for i in range(n):
    ans += (least_common_multiple-1)%a[i]
print(ans)

### FIXED CODE ###

import numpy as np
n = int(input())
a = np.array(list(map(int,input().split())))-1
print(a.sum())
from collections import Counter
n = int(input())
l = []
for i in range(n):
   l.append(int(input()))
lcnt = Counter(l)
l_value = list(lcnt.values())
for i in range(len(l_value)):
   if  l_value[i]%2 == 0:
       l_value[i] = 0
  else:
       l_value[i] = 1    
print(sum(l_value))


### FIXED CODE ###

from collections import Counter
n = int(input())
l = []
for i in range(n):
   l.append(int(input()))
lcnt = Counter(l)
l_value = list(lcnt.values())
for i in range(len(l_value)):
  if l_value[i]%2 == 0:
    l_value[i] = 0
  else:
    l_value[i] = 1    
print(sum(l_value))
A,B,T = map(int,input().split())
H = (T + ) // A
print(B * H)

### FIXED CODE ###

A,B,T = map(int,input().split())
H = (T + 0.5) // A
F = B * H // B * H
print(round(B * H))
N,D=map(int,input.split())
a=N/(2*D+1)
if a%1==0:
  print(a)
else:
  print(int(a)+1)

### FIXED CODE ###

n,d=map(int,input().split())
w=2*d+1
if n%w==0:
  print(n//w)
else:
  print(n//w+1)
print(''.join(['x']*len(input()))

### FIXED CODE ###

print(''.join(['x']*len(input())))
N = int(input())
X = list(map(int, input().spit()))
for i in range(N):
  for j in range(i+1, N):
    ans += X[i] * X[j]
    
print(ans)

### FIXED CODE ###

N = int(input())
X = list(map(int, input().split()))
ans = 0
for i in range(N):
  for j in range(i+1, N):
    ans += X[i] * X[j]
    
print(ans)
N=int(input())
A=[]
B=[]
for i in range(N):
  a,b=map(int,input().split())
  A.append(a)
  B.append(b)

ans=0
for i in range(N-1,-1,-1):
  a=A[i]+ans
  b=B[i]
  if a < b:
    ans+=(b-a)
  elif a % b==0
    continue
  else:
    ans+=(a+b)//b*b-a
    
print(ans)

### FIXED CODE ###

N=int(input())
A=[]
B=[]
for i in range(N):
  a,b=map(int,input().split())
  A.append(a)
  B.append(b)

ans=0
for i in range(N-1,-1,-1):
  a=A[i]+ans
  b=B[i]
  if a ==0 or a % b ==0:
    continue
  else:
    ans+=(a+b)//b*b-a
    
print(ans)
i = 1
while True:
    H,W = [int(x) for x in input().split( )]
    for i in range(H):
        print('#'*W)



### FIXED CODE ###

while True:
    H,W = [int(x) for x in input().split( )]
    if H == 0 and W == 0: 
        break
    for i in range(H):
        print('#'*W)
    print()
#include <stdio.h>
int main(void) {
	int num, i, k, u;
	int v[101];
	const char *fmt;

	scanf("%d", &num);
	for (i = 0; i < num; i++) {
		for (k = 1; k <= num; k++) {
			v[k] = 0;
		}
		scanf("%d %d", &u, &k);
		while (k--) {
			scanf("%d", &u);
			v[u] = 1;
		}
		fmt = "%d";
		for (k = 1; k <= num; k++) {
			printf(fmt, v[k]);
			fmt = " %d";
		}
		putchar('\n');
	}
	return 0;
}

### FIXED CODE ###

#!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin


def main():
    num = int(stdin.readline())

    for _ in xrange(num):
        L = [int(s) for s in stdin.readline().split()][2:]
        print(*(int(i in L) for i in xrange(1, num+1)))


main()
class UnionFind:
  def __init__(self, size):
    self.parents = [x for x in range(size)]
    self.sizes = [1] * size
  
  def unite(self, a, b):
    if self.find(a) == self.find(b):
      return
    
    if self.size_of(a) > self.size_of(b):
      self.sizes[self.find(a)] += self.size_of(b)
      self.parents[self.find(b)] = self.find(a)
    else:
      self.sizes[self.find(b)] += self.size_of(a)
      self.parents[self.find(a)] = self.find(b)
  
  def is_same(self, a, b):
    return self.find(a) == self.find(b)
  
  def size_of(self, a):
    return self.sizes[self.find(a)]
  
  def find(self, a):
    if a == self.parents[a]:
      return a
    else:
      self.parents[a] = self.find(self.parents[a])
      return self.parents[a]


N, M, K = map(int, input().split())

u = UnionFind(N)

# 自分自身・友達・ブロック関係のいずれかの場合はフラグ立つ
relations = [1 << i for i in range(N)]

for _ in range(M):
  a, b = map(int, input().split())
  a, b = a - 1, b - 1
  relations[a] |= 1 << b
  relations[b] |= 1 << a
  u.unite(a, b)
  
for _ in range(K):
  c, d = map(int, input().split())
  c, d = c - 1, d - 1
  
  # 同じ連結成分に含まれないブロック関係は無視してok
  if u.is_same(c, d):
    relations[c] |= 1 << d
    relations[d] |= 1 << c

candidates = []

for i in range(N):
  candidates.append(u.size_of(i) - bin(relations[i]).count('1'))
    
print(' '.join(str(x) for x in candidates))

### FIXED CODE ###

from math import ceil

N = int(input());

print(ceil(N / 2))
n,m=map(int,input().split())
a=[i for i in map(int,input().split())]
a.sort()
b=[]
for _ in range(m):
    b1=[i for i in map(int,input().split())]
    b1.reverse()
    b+=[b1]
b.sort(reverse=True)

i=0
f=0
s=0
while f==0:
    if a[s+b[i][1]-1]<b[i][0]:
        a[s:s+b[i][1]]=[b[i][0]]*(b[i][1])
        s+=b[i][1]
    elif a[s]<b[i][0]:
        j=0
        while a[s+j]<b[i][0]:
            a[s+j]=b[i][0]
            j+=1
        f+=1
    else:
        f+=1
    i+=1
    if i>len(b)-1:
        f+=1

print(sum(a))

### FIXED CODE ###

n,m=map(int,input().split())
a=[i for i in map(int,input().split())]
a.sort()
b=[]
for _ in range(m):
    b1=[i for i in map(int,input().split())]
    b1.reverse()
    b+=[b1]
b.sort(reverse=True)

i=0
f=0
s=0
lenb=len(b)
lena=len(a)
while f==0:
    if i>lenb-1 or s>lena-1:
        break
    elif s+b[i][1]>lena-1:
        b[i][1]=lena-s
    if a[s+b[i][1]-1]<b[i][0]:
        a[s:s+b[i][1]]=[b[i][0]]*(b[i][1])
        s+=b[i][1]
    elif a[s]<b[i][0]:
        j=0
        while a[s+j]<b[i][0]:
            a[s+j]=b[i][0]
            j+=1
            if s+j>lena-1:
                break
        break
    else:
        break
    i+=1

print(sum(a))
N = int(input())
h = int(input().split())
count = 0
max = 0
for i in range(n):
    if max <= h[i]:
        max = h[i]
        count += 1
print(count)

### FIXED CODE ###

N = int(input())
h = list(map(int, input().split()))
count = 0
max = 0
for i in range(N):
    if max <= h[i]:
        max = h[i]
        count += 1
print(count)
# AtCoder Beginner Contest 158 - C - Tax Increase
# お送り頂いたコードをもとにした解法（該当する元の金額を二重の for 文で検査する）

A,B = list(map(int,input().split()))
z=0

#【註】手を加えたのは、コメントを付した 2 箇所のみとなります。
# 8% の消費税の場合、この計算では「消費税計算において小数点以下が切り捨てになる」ことを反映できず、
# 計算結果が誤差を生じてしまいます。たとえば 8% 時の消費税額が 1 円の場合は、本来であれば価格が 13 円～24 円のレンジに
# 収まらなければなりませんが、当初の計算では 12 円から 25 円のレンジになってしまいます。

#for x in range(int(25*A/2),int(25*(A+1)/2)):
for x in range(int(((25*A)+1)/2),int((25*(A+1)-1)/2)):
    for y in range(int(10*B),int(10*(B+1))):
        if x==y:
            print(x)
            break
        else:
            z += 1
    if x==y:
        break
#if z==(int(25*(A+1)/2)-int(25*A/2))*(int(10*(B+1))-int(10*B)):    
if z==(int((25*(A+1)-1)/2)-int(((25*A)+1)/2))*(int(10*(B+1))-int(10*B)):    
    print(-1)


A,B = list(map(int,input().split()))
found = False
for i in range(1010):
    A_tax = int(i * 0.08)
    B_tax = int(i * 0.10)
    if A == A_tax and B == B_tax:
        print(i)
        found = True
        break
if not found:
    print("-1")

### FIXED CODE ###

A,B = list(map(int,input().split()))
found = False
for i in range(1010):
    A_tax = int(i * 0.08)
    B_tax = int(i * 0.10)
    if A == A_tax and B == B_tax:
        print(i)
        found = True
        break
if not found:
    print("-1")
MN=input().split()
M=int(MN[0])
N=int(MN[1])  
div=int(N/M)
if (N%M)<N and (N%M)>0:
 cont=1 
elif (N%M)==0: 
  cont=0
print(cont+div)  

### FIXED CODE ###

import math
A, B = input().split()
A = int(A)
B = int(B)
n = math.ceil((B-1)/(A-1))
print(n)
import sys;input=sys.stdin.readline
from bisect import*

n,q=map(int,input().split())
event=[]
stopped=set([-1])

def doevent(l):
    global stopped
    if l[1]==1:
        if stopped=={-1}:
            stopped=set()
        stopped.add(l[2])
    elif l[1]==-1:
        stopped.remove(l[2])
        if len(stopped)==0:
            stopped={-1}
            
for i in range(n):
    s,t,x=map(int,input().split())
    event.append((s-x,1,x))
    event.append((t-x,-1,x))
event.append((-float("inf"),"x","x"))
event.append((float("inf"),"x","x"))
event.sort(key=lambda x:x[0])
eventtime=[i[0]for i in event]
#print(eventtime)
query=[bisect_right(eventtime,int(input()))-1 for i in range(q)]+[float("inf")]
#print(query)
c=0
#print(event)
for i in range(2*n+1):
    doevent(event[i])
    try:
        while i==query[c]:
            print(min(stopped))
            c+=1
    except:
        break


### FIXED CODE ###

import sys;input=sys.stdin.readline

n,q=map(int, input().split())
event=[]
for _ in range(n):
    s,t,x=map(int,input().split())
    event.append((s-x-0.5,1,x))
    event.append((t-x-0.5,-1,x))
for i in range(q):
    event.append((int(input()),0,i))
    
event.sort()
is_stop=False
stop=set()
minstop=float('inf')
ans=[-1]*q
for t,e,x in event:
    if e > 0:
        stop.add(x)
        if x<minstop:
            minstop=x
            is_stop=True
    elif e<0:
        stop.remove(x)
        if minstop==x:
            is_stop=False
    elif len(stop)>0:
        if not is_stop:
             minstop=min(stop)
             is_stop=True
        ans[x]=minstop
        
print('\n'.join(map(str, ans)))
from collections import defaultdict
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

S = input()[:-1]
T = input()[:-1]

# 作れない場合
if any(t not in S for t in T):
    print(-1)
    exit()


D = defaultdict(lambda: set())
min_D = defaultdict(lambda: len(S)+1)
for i, s in enumerate(S):
    D[s].append(i)
    min_D[s] = min(i, min_D[s])

for s in D.keys():
  D[s]=sorted(D[s])
cur_pos = 0
repeat = 0
for t in T:
    for next_cand in D[t]:
        if next_cand >= cur_pos:
            cur_pos = next_cand+1
            break
    else:
        repeat += 1
        cur_pos = min_D[t]
print(len(S)*repeat+cur_pos)


### FIXED CODE ###

import bisect
from collections import defaultdict
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

S = input()[:-1]
T = input()[:-1]

# 作れない場合
if any(t not in S for t in T):
    print(-1)
    exit()


D = defaultdict(lambda: [])
min_D = defaultdict(lambda: len(S)+1)
for i, s in enumerate(S):
    D[s].append(i)
    min_D[s] = min(i, min_D[s])

for s in D.keys():
    D[s] = sorted(D[s])

cur_pos = 0
repeat = 0
for t in T:
    #print("cur->", cur_pos)
    ind = bisect.bisect_left(D[t], cur_pos)
    if ind >= len(D[t]):
        repeat += 1
        cur_pos = min_D[t]+1
    else:
        cur_pos = D[t][ind]+1

print(len(S)*repeat+cur_pos)
import math

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

br = [list(map(int, input().split())) for _ in range(m)]

ans = []

def ncr(n, r):
    if n<r:
        return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

subg = {i+1:i+1 for i in range(n)}

nodes = {i+1:1 for i in range(n)}

res = []
r = ncr(n, 2)

def fetch(i):
    if i == subg[i]:
        return i
    j = fetch(subg[i])
    subg[i] = j
    return j

for a, b in reversed(br):
    # print(subg, nodes)

    if len(nodes.keys()) == 1:
        res.append(0)
        continue
    else:
        res.append(r)

    mi, ma = min(a,b), max(a,b)
    
    x = nodes[fetch(mi)] 
    y = nodes[fetch(ma)]

    r += ncr(x, 2) + ncr(y, 2)
    r -= ncr(x+y, 2)
    v, w = max(fetch(mi), fetch(ma)), min(fetch(mi), fetch(ma))
    nodes[w] += nodes[v]
    del nodes[v] 
    subg[mi] = w
    subg[ma] = w

for i in reversed(res):
    print(i)



### FIXED CODE ###


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

br = [list(map(int, input().split())) for _ in range(m)]

ans = []

def nc2(n):
    if n<2:
        return 0
    return n * (n-1) // 2


class UnionFind:

    def __init__(self, size):
        self.table = [-1 for _ in range(size+1)]
        self.size = [1 for _ in range(size+1)]

    def find(self, x):
        while self.table[x] >= 0:
            x = self.table[x]
        return x

    def union(self, x, y):
        s1 = self.find(x)
        s2 = self.find(y)
        if s1 != s2:
            if self.table[s1] != self.table[s2]:
                if self.table[s1] < self.table[s2]:
                    self.table[s2] = s1
                    self.size[s1] += self.size[s2]
                    self.size[s2] = 0
                else:
                    self.table[s1] = s2
                    self.size[s2] += self.size[s1]
                    self.size[s1] = 0
            else:
                self.table[s1] += -1
                self.table[s2] = s1
                self.size[s1] += self.size[s2]
                self.size[s2] = 0

    def get_size(self, x):
        s1 = self.find(x)
        return self.size[s1]

    def check_same(self, x, y):
        return self.find(x) == self.find(y)

res = []
r = nc2(n)

uf = UnionFind(n)

for a, b in reversed(br):

    res.append(r)

    if not uf.check_same(a,b):
        r -= uf.get_size(a)*uf.get_size(b)

    uf.union(a,b)

for i in reversed(res):
    print(i)
N,R=map(int,input().split())
ans=R+100*(10-K)
print(ans)

### FIXED CODE ###

N,R=map(int,input().split())
if N>=10:
  print(R)
else:
  print(R+100*(10-N))
l = []
l.append(int(input()))
i = 0
while True:
  if s&2:
    l.append(3*l[i]+1)
  else:
    l.append(l[i]/2)
  i += 1
  for j in range(j,i):
    if l[j] == l[i]:
      break
print(i)

### FIXED CODE ###

l = []
l.append(int(input()))
i = 0
key = 1
while key:
  if l[i]%2:
    l.append(3*l[i]+1)
  else:
    l.append(l[i]/2)
  i += 1
  for j in range(i-1):
    if l[j] == l[i]:
      key = 0
      print(i+1)
      break
n,m = map(int,input().split())
alis = [int(i) for i in input().split()]
bclis = []
for i in range(m):
    bclis.append(list(map(int,input().split())))
bclis.sort(key=lambda x:x[1],reverse=True)
alis.sort()
def ans(bclis,alis):
    count=0
    for i in bclis:
        for j in range(i[0]):
            if alis[count] >= i[1]:
                return alis
            else :
                alis[count] = i[1]
            count += 1
    return alis
# print(alis)
# print(bclis)
# print(ans(bclis,alis))
print(sum(ans(bclis,alis)))


### FIXED CODE ###

n,m = map(int,input().split())
alis = [int(i) for i in input().split()]
bclis = []
for i in range(m):
    bclis.append(list(map(int,input().split())))
bclis.sort(key=lambda x:x[1],reverse=True)
alis.sort()
def ans(bclis,alis):
    count=0
    for i in bclis:
        for j in range(i[0]):
            if alis[count] >= i[1]:
                return alis
            else :
                alis[count] = i[1]
            count += 1
            if count == n:
                return alis
    return alis
# print(alis)
# print(bclis)
# print(ans(bclis,alis))
print(sum(ans(bclis,alis)))
def make_divisors(n,m):
    divisors = []
    i=1
    while i*i<m:
      if m % i == 0:
          divisors.append(i)
          if i != m // i and m//i<=m//n:
              divisors.append(m//i)
      i+=1
    return divisors
n,m=map(int,input().split())
print(max(make_divisors(n,m)))


### FIXED CODE ###

i=input()
if i=="2":
  n=int(input())
  m=int(input())
  print(n+m)
else:
  print("Hello World")
N, M = map(int, input().split())
X = list(map(int, input().split()))
if M == 1:
    print(0)
else:
    X.sort()
    X_difs = [X[i+1] - X[i] for i in range(M-1)]
    X_difs.sort()
    for _ in range(N-1):
        X_difs.pop(-1)
    print(sum(X_difs))


### FIXED CODE ###

N, M = map(int, input().split())
X = list(map(int, input().split()))
if M == 1 or N>=M:
    print(0)
else:
    X.sort()
    X_difs = [X[i+1] - X[i] for i in range(M-1)]
    X_difs.sort()
    for _ in range(N-1):
        X_difs.pop(-1)
    print(sum(X_difs))
N = int(input())
p = list(map(int,input().split(' ')))
p1 = p.copy()
p1.sort()
for i in range(N):
    for i1 in range(i,N):
        p2 = p.copy()
        p2[i],p2[i1] = p2[i1],p2[i]
        if p2 == p1:
            print("YES")
            exit()
print("NO")


### FIXED CODE ###

N = int(input())
p = list(map(int,input().split(' ')))
p1 = p.copy()
p1.sort()
for i in range(N):
    for i1 in range(i,N):
        p2 = p.copy()
        p2[i],p2[i1] = p2[i1],p2[i]
        if p2 == p1:
            print("YES")
            exit()
print("NO")
n,k = map(int,input().split())
an = list(map(int, input().split()))
copyan = an[:]
i = copyan[0]
copyan[0]=10**6
movecount = 1
roopstart = 0
if i != 1:
    while True:
        memo = i
        i = copyan[i-1]
        copyan[memo-1]=10**6 + movecount
        
        
        if i >=30000:
            yokei = i%(10**6)
            
            break
        movecount += 1
        roopstart = i
else:
    print()
roopnum = movecount - yokei
x = (k-yokei)%roopnum #移動する回数

count = 0
iti = an[roopstart]
while True:
    
    if x == 0:
        print(roopstart)
        exit()
    else:
        iti = an[iti-1]
        
        count += 1
        if count == x:
            print(iti+1)
            exit()









### FIXED CODE ###

n,k = map(int,input().split())
an = list(map(int, input().split()))
copyan = an[:]
i = copyan[0]
copyan[0]=10**6
movecount = 1

if i != 1:
    while True:
        memo = i
        if k == movecount:
            print(i)
            
            exit()
        i = copyan[i-1]
        
        if i >=300000:
            yokei = i%(10**6)         
            break
        copyan[memo-1]=10**6 + movecount
        movecount += 1
        
else:
    print(1)
    exit()
roopnum = movecount - yokei
x = (k-yokei)%roopnum

ans = copyan.index(10**6+yokei+x) +1
print(ans)
n=int(input())
nums=list(map(int,input()))
count=0
for i in range(n):
    minj=i
    for j in range(i,n):
        if nums[j] < nums[minj]:
            minj=j
    nums[i]=v
    nums[i]=nums[minj]
    nums[minj]=v
    count+=1
print(*nums)
print(count)


### FIXED CODE ###

N = int(input())
*A, = map(int,input().split())
count = 0
for i in range(N):
    minj = i
    for j in range(i,N):
        if A[j] < A[minj]:
            minj = j
    if not minj == i:
        tmp = A[i]
        A[i] = A[minj]
        A[minj] = tmp
        count += 1
    
print(*A)
print(count)
a=input().split(' ')
b=input().split(' ')
c=0
for i in int(a[1]):
    if i != a[1]-1:
        if int(b[i+1]) - int(b[i]) > c:
            c = int(b[i+1]) - int(b[i])
    else:
        if int(a[0]) - int(b[-1])+ int(b[0]) > c:
            c = int(a[0]) - int(b[-1])+ int(b[0])
print(int(a[0])-c)

### FIXED CODE ###

a=input().split(' ')
b=input().split(' ')
c=0
for i in range(int(a[1])):
    if i != int(a[1])-1:
        if int(b[i+1]) - int(b[i]) > c:
            c = int(b[i+1]) - int(b[i])
    else:
        if int(a[0]) - int(b[-1])+ int(b[0]) > c:
            c = int(a[0]) - int(b[-1])+ int(b[0])
print(int(a[0])-c)
from collections import deque
h,w = map(int,input().split())
#0が進めるところ、1は無理
lis = [[1 if l == '#' else 0 for l in list(input())] for _ in range(h)]
#ゴールは9
lis[h-1][w-1] = 9
#print(lis)
#[[0, 0, 1], [1, 0, 0], [0, 0, 9]]

#この問題ではbfsを始める前に、もともと移動可能だったところの数を記録しておく
road = 0
for row in lis:
    for column in row:
        if column != 1:
            road +=1

count = 0
#(開始x,開始y,移動回数)
pos = [[0,0,0]]
que = deque(pos)
while len(pos)>0:
    x,y,depth = que.popleft()

    if lis[x][y] == 9:
        count = depth
        break

    #探索済みのところは、1にする
    lis[x][y] = 1

    #遷移先は0or9なので、1以外なら行ける
    if x-1>=0 and lis[x-1][y] != 1:
        pos.append([x-1,y,depth+1])
    if x+1<h and lis[x+1][y] != 1:
        pos.append([x+1,y,depth+1])
    if y-1>=0 and lis[x][y-1] != 1:
        pos.append([x,y-1,depth+1])
    if y+1<w and lis[x][y+1] != 1:
        pos.append([x,y+1,depth+1])

#そもそも行けない
if count == 0:
    print(-1)
#(移動可能マス数) - (移動する道順上のマスの数 ＝ 最短の移動回数＋１）
else:
    print(road-(count+1))

### FIXED CODE ###

h,w = (int(x) for x in input().split())
ab = []
count = 0
for _ in range(h):
    a = input()
    a = a+'#'
    ab.append(list(a))
    for i in a:
        if i == '.':
            count += 1
ab.append(list('#'*w))
dp = [[0 for i in range(w)] for j in range(h)]
 
step = [[0, 0]]
dp[0][0] = 1
 
while len(step) > 0:
    y, x = step.pop(0)
    if y == h-1 and x == w-1:
        print(count-dp[y][x])
        exit()
    if ab[y+1][x] == '.' and dp[y+1][x] == 0 :
        step.append([y+1, x])
        dp[y+1][x] = dp[y][x] + 1
    if ab[y][x+1] == '.' and dp[y][x+1] == 0 :
        step.append([y, x+1])
        dp[y][x+1] = dp[y][x] + 1
    if ab[y-1][x] == '.' and dp[y-1][x] == 0 :
        step.append([y-1, x])
        dp[y-1][x] = dp[y][x] + 1
    if ab[y][x-1] == '.' and dp[y][x-1] == 0 :
        step.append([y, x-1])
        dp[y][x-1] = dp[y][x] + 1
 
 
print(-1)
N = int(input())

import numpy as np

a = np.arange(1, N+1)
p = np.copy(a) + 1
p[-1] = 1

print(np.sum(a%p))


### FIXED CODE ###

N = int(input())

print((N-1) * N // 2)
n,m = map(int,input().split())

a = []
for _ in range(m):
    a.append(int(input()))

dp = [0 for _ in range(n+1)]
dp[0] = 1
dp[1] = 1
dp[2] = 2
c = 0
for i in range(1,n+1):
    if i == a[c]:
        dp[i] = 0
        if c < m-1:
            c += 1
    else:
        dp[i] = dp[i-1] + dp[i-2]

print(dp[n]%(10**9+7))


### FIXED CODE ###

import sys

n,m = map(int,input().split())
t = [0] * 2
t[0] = 1
t[1] = 2
a = []
for _ in range(m):
	a.append(int(input()))
mod = 10**9 + 7

for i in range(1,m):
	if a[i] - a[i-1] == 1:
		print(0)
		sys.exit()
a.append(n+1)

l = []
dan = 0
for i in range(m+1):
	l.append(a[i]-1-dan)
	dan = a[i] + 1
	if dan == n+2:
		break

if max(l) > 2:
	for i in range(2,max(l)):
		t.append(t[i-1] + t[i-2])

ans = 1
for i in l:
	if i != 0 and t[i-1] != 0:
		ans *= t[i-1]
		ans %= mod

print(ans)
# using dp with memoization, TLE
from sys import stdin
N, W = map(int, input().split())
m = stdin.read().splitlines()
s = [[int(i) for i in line.split()] for line in m]

dp = [0] * (W + 1)
next_dp = [0] * (W + 1)
for n in range(1, N + 1):
    for w in range(0, W + 1):
        if w >= s[n - 1][0]:
            next_dp[w] = max(next_dp[w], dp[w - s[n - 1][0]] + s[n - 1][1])
    dp = next_dp[:]
print(dp[W])


### FIXED CODE ###

"""
https://atcoder.jp/contests/dp/tasks/dp_a
"""
from sys import stdin

n = int(input())
h = list(map(int, stdin.readline().strip().split()))

dp = [float('inf') for _ in range(n)]

dp[0] = 0
dp[1] = abs(h[1] - h[0])
for i in range(2, n):
    dp[i] = min(dp[i], dp[i - 1] + abs(h[i] - h[i - 1]),
                dp[i - 2] + abs(h[i] - h[i - 2]))

print(dp[n - 1])
r = (int input())
print(r*6.3)


### FIXED CODE ###

r = int(input())
print(6.3*r)