Harryxun/stf_run huggingface dataset:
#
import sys
import math
import numpy as np
import itertools

# いくつか入力
n,q = (int(i) for i in input().split())  
# 文字列をリストに
s = list(input())

# n行複数列の数をリストに
td = [[i for i in input().split()] for i in range(q)] 


hidari = 0
migi   = n-1

for i in range(q-1,-1,-1):
    if td[i][0] == s[hidari] and td[i][1] == 'L':
        hidari += 1

for i in range(q-1,-1,-1):
    if td[i][0] == s[migi] and td[i][1] == 'R':
        migi -= 1

if migi <= hidari:
    print("0")
else:
    print(migi-hidari+1)




### FIXED CODE ###

#
import sys
import math
import numpy as np
import itertools

# いくつか入力
n,q = (int(i) for i in input().split())  
# 文字列をリストに
s = list(input())

# n行複数列の数をリストに
td = [[i for i in input().split()] for i in range(q)] 


hidari = 0
migi   = n-1

for i in range(q-1,-1,-1):
    if td[i][0] == s[hidari] and td[i][1] == 'L':
        hidari += 1
        if hidari == n:
            print("0")
            exit()
    elif hidari >0:
        if td[i][0] == s[hidari-1] and td[i][1] == 'R' :
            hidari -= 1

for i in range(q-1,-1,-1):
    if td[i][0] == s[migi] and td[i][1] == 'R':
        migi -= 1
        if migi == -1:
            print("0")
            exit()
    elif migi <n-1:
        if td[i][0] == s[migi+1] and td[i][1] == 'L' :
            migi += 1

if migi < hidari:
    print("0")
else:
    print(migi-hidari+1)

#print(migi,hidari)
import sys
import stdin
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
readline = stdin.readline

# main
n = int(readline())
xy = [tuple(map(int, readline().split())) + (i,) for i in range(n)]
# [..., (x_i, y_i, i), ...]
# sort by x
xy.sort()

root = int(math.sqrt(len(xy)))

low = [x for x, y, i in xy[::root]]
high = [x for x, y, i in xy[root - 1::root]] + [float('inf')]

xy = [sorted(xy[i:i + root], key=itemgetter(1)) for i in range(0, len(xy), root)]
xy = [([y for x, y, i in xyi], xyi) for xyi in xy]
for sx, tx, sy, ty in (map(int, readline().split()) for _ in range(int(readline()))):
    ret = []
    for i in range(bisect_left(high, sx), bisect_right(low, tx)):
        k, v = xy[i]
        for i in range(bisect_left(k, sy), bisect_right(k, ty)):
            if sx <= v[i][0] <=tx:
                ret.append(v[i][2])
    if ret:
        ret.sort()
        print('\n'.join(map(str,ret)))
    print()

### FIXED CODE ###

#!/usr/bin/python3
from sys import stdin
import math
from operator import itemgetter
from bisect import bisect_left, bisect_right
readline = stdin.readline

def main():
    n = int(readline())
    xy = [tuple(map(int, readline().split())) + (i,) for i in range(n)]
    # [..., (x_i, y_i, i), ...]
    # sort by x
    xy.sort()

    root = int(math.sqrt(len(xy)))

    low = [x for x, y, i in xy[::root]]
    high = [x for x, y, i in xy[root - 1::root]] + [float('inf')]

    xy = [sorted(xy[i:i + root], key=itemgetter(1)) for i in range(0, len(xy), root)]
    xy = [([y for x, y, i in xyi], xyi) for xyi in xy]
    for sx, tx, sy, ty in (map(int, readline().split()) for _ in range(int(readline()))):
        ret = []
        for i in range(bisect_left(high, sx), bisect_right(low, tx)):
            k, v = xy[i]
            for i in range(bisect_left(k, sy), bisect_right(k, ty)):
                if sx <= v[i][0] <=tx:
                    ret.append(v[i][2])
        if ret:
            ret.sort()
            print('\n'.join(map(str,ret)))
        print()

main()
import math
import re

a = input()
b = int(re.findall('^.',a))
c = float(re.findall('.$',a))

c = a * b
print(math.floor(c))

### FIXED CODE ###

import math
import re
from decimal import *

a = input()
b = int(re.sub('\s.+$','',a))
c = Decimal(re.sub('^.+\s','',a))
d = Decimal(b * c)
d = math.floor(d)
d = int(d)

print(d)
from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    mmax = max(d.values())
    mmax = int(N - mmax)
    try:
        print(mmax)
    except TypeError:
        print(100)


if __name__ == '__main__':
    main()

### FIXED CODE ###

from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    try:
        mmax = N - max(d.values(), default=0)
        print(mmax)
    except ValueError:
        print(100)

if __name__ == '__main__':
    main()
n = int(input())
min = -1
for i in range(1,n+1):
  if min == -1:
    if n % i == 0:
      if min < x + n/i
      
print(min)

### FIXED CODE ###

import math
n = int(input())
min = n - 1
#√n を算出
split = n / math.sqrt(n)


for i in range(int(split),0,-1):
    if n % i == 0:
        min = i + n/i -2
        break

print(int(min))
import collections
N=int(input())
a=list(map(int,input().split()))
l=[]
if max(a)==0:
    print("Yes")
elif (N%3)==0:
    c=collections.Counter(a)
    values = list(c.values())  # aのCollectionのvalue値のリスト(n_1こ、n_2こ…)
    key = list(c.keys())  # 先のvalue値に相当する要素のリスト(要素1,要素2,…)
    for i in range(len(key)):
        l.append([key[i], values[i]])  # lは[要素i,n_i]の情報を詰めたmatrix
    l.sort(key=lambda x:x[1],reverse=True)
    #print(l)
    if ((len(l)==3)and(l[0][1]==l[0][2]==l[0][3])and(l[0]^l[1]==l[2])):
        print("Yes")
    elif (len(l)==2)and(l[0][1]==2*l[1][1])and(l[1][0]==0):
        print("Yes")
    else:
        print("No")
else:
    print("No")

### FIXED CODE ###

import collections
N=int(input())
a=list(map(int,input().split()))
l=[]
if max(a)==0:
    print("Yes")
elif (N%3)==0:
    c=collections.Counter(a)
    values = list(c.values())  # aのCollectionのvalue値のリスト(n_1こ、n_2こ…)
    key = list(c.keys())  # 先のvalue値に相当する要素のリスト(要素1,要素2,…)
    for i in range(len(key)):
        l.append([key[i], values[i]])  # lは[要素i,n_i]の情報を詰めたmatrix
    l.sort(key=lambda x:x[1],reverse=True)
    #print(l)
    if (len(l)==3)and(l[0][1]==l[1][1]==l[2][1])and(l[0][0]^l[1][0]==l[2][0]):
        print("Yes")
    elif (len(l)==2)and(l[0][1]==2*l[1][1])and(l[1][0]==0):
        print("Yes")
    else:
        print("No")
else:
    print("No")
import sys

targetPrice = int(input())
cakePrice = 4
donutPrice = 7
maxDonutCount = int(targetPrice / 7)

for i in range(maxDonutCount + 1):
    targetCakePrice = targetPrice - (donutPrice * i)
    if targetCakePrice % cakePrice == 0:
        print("Yes")
        sys.exit()
print("No")


### FIXED CODE ###

numSenbei, numPeople = [int(i) for i in str(input()).split()]

if numSenbei % numPeople == 0:
    print(0)
else:
    print(1)
from itertools import permutations

Num = [int(n) for n in input().rstrip().split()]

D = [int(n) for n in input().rstrip().split()]

for i in range(Num[0],10000):
    if len(set([str(n) for n in D]) & set(str(i))) == 0:
        print(i)
        break


### FIXED CODE ###

num  = [int(n) for n in input().rstrip().split()]

if num.count(5) == 2 and num.count(7) == 1:
    print("YES")

else:
    print("NO")
H,W=map(int.input().split())
h,w=map(int.input().split())

return H*W-h*W-w*H+h*w

### FIXED CODE ###

p=[list(map(int,input().split())) for i in range(2)]

print((p[0][0]-p[1][0])*(p[0][1]-p[1][1]))
N,L=map(int, input().split())
 
sum = 0
lower = 100
for i in range(1, N+1):
    sum = sum + L + i -1
for i in range(1, N+1):
    s = abs(L + i -1)
    if s < lower:
        lower = s
        ij = i
 
print(sum - (L + ij -1))

### FIXED CODE ###

N,L=map(int, input().split())
 
sum = 0
lower = 100000
for i in range(1, N+1):
    sum = sum + L + i -1
for i in range(1, N+1):
    s = abs(L + i -1)
    if s < lower:
        lower = s
        ij = i
 
print(sum - (L + ij -1))
def lcs(X, Y):
    #X = " " + X
    #Y = " " + Y
    #c = [[0 for j in xrange(len(Y))] for i in xrange(len(X))]
    c2 = [0???for i in xrange(len(Y))]
    #maxl = 0
     
    for i in xrange(1,len(X)):
        c1 = c2 + []
        for j in xrange(1,len(Y)):
            if X[i] == Y[j]:
                c2[j + 1] = c1[j] + 1
            elif c2[j + 1] < c2[j]:
                c2[j + 1] = c2[j]
    return c2[-1]
n = int(raw_input())
  
for i in xrange(n):
    s1 = raw_input()
    s2 = raw_input()
    print lcs(s1, s2)

### FIXED CODE ###

def lcs(X, Y):
    #X = " " + X
    #Y = " " + Y
    #c = [[0 for j in xrange(len(Y))] for i in xrange(len(X))]
    c2 = [0 for i in xrange(len(Y) + 1)]
    #maxl = 0
     
    for i in xrange(len(X)):
        c1 = c2 + []
        for j in xrange(len(Y)):
            if X[i] == Y[j]:
                c2[j + 1] = c1[j] + 1
            elif c2[j + 1] < c2[j]:
                c2[j + 1] = c2[j]
    return c2[-1]
n = int(raw_input())
  
for i in xrange(n):
    s1 = raw_input()
    s2 = raw_input()
    print lcs(s1, s2)
import math
N = int(input())
prime=[]
count=[]
ans = 1
place = 0
n = math.factorial(N)
tmp = int(math.sqrt(n))+1
for k in range(1,N+1):
    for i in range(2,tmp):
        while k % i == 0:
            k //= i
            if(i in prime):
                count[prime.index(i)] += 1
            else:
                prime.append(i)
                count.append(1)
                place += 1
for j in range(0,place):
    ans *= (count[j]+1)
print(ans)

### FIXED CODE ###

import math
N = int(input())
prime=[]
count=[]
ans = 1
place = 0
t=10**9
t+=7
for k in range(1,N+1):
    for i in range(2,k+1):
        while k % i == 0:
            k //= i
            if(i in prime):
                count[prime.index(i)] += 1
            else:
                prime.append(i)
                count.append(1)
                place += 1
for j in range(0,place):
    ans *= (count[j]+1)
print(ans%t)
N, A, B = map(int, input().split(' '))

row = ''
for i in range(1000):
    row +='b' * A
    row+= 'r' * B

print(list(row[:N]).count('b'))

### FIXED CODE ###

N, A, B = map(int, input().split(' '))
 
blue = 0
if N!=0 and A!=0:    
    blue = A *int(N/(A+B))
    if N%(A+B) <= A:
        blue += N%(A+B)
    else:
        blue += A 
print(blue)
import fractions
from functools import reduce


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


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


n = int(sys.stdin.readline())
l = [int(_) for _ in sys.stdin.readline().split()]
x = lcm_list(l)
ans = 0
for i in range(n):
    ans += x // l[i]
    ans %= (10**9 + 7)
print(ans)

### FIXED CODE ###

import fractions
from functools import reduce

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


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


n = int(input())
l = [int(_) for _ in input().split()]
x = lcm_list(l)
ans = 0
for i in range(n):
    ans += x // l[i]
ans %= (10**9 + 7)
print(ans)
n=int(input())
l3 = list(map(int,input().split()))
l = set(l3)
l2 = list(l)
if n % 3 != 0:
    print("No")
elif len(l) != 3:
  if len(l)==1 and l2[0]==0:
    print("Yes")
  elif len(l)==2:
    if l3.count(l[0])>l3.count(l[1]):
      if l[0]==l[0]^l[1] and l[1]==l[0]^l[0]:
          print("Yes")
      else:
          print("No")
    elif l3.count(l[1])>l3.count(l[0]):
      if l[1]==l[1]^l[0] and l[0]==l[1]^l[1]:
          print("Yes")
      else:
          print("No")
          
    print("Yes")
  else:
    print("No")
else:
    if (l2[0] ^ l2[1] == l2[2]) and (l2[1] ^ l2[2] == l2[0]) and (l2[2] ^ l2[0] == l2[1]):
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

n=int(input())
l = list(map(int,input().split()))
s = set(l)
sl = sorted(list(s))
if len(s)==1 and sl[0]==0:
  print("Yes")
elif n%3==0 and len(s)==2 and l.count(sl[1])==2*n//3 and l.count(sl[0])==n//3 and sl[0]==0:
  print("Yes")
elif n%3==0 and len(s)==3 and l.count(sl[0])==l.count(sl[1])==l.count(sl[2]):
  if sl[0]^sl[1]^sl[2]==0:
    print("Yes")
  else:
    print("No")
else:
  print("No")
from collections import deque

dyx = ((0, 1), (0, -1), (1, 0), (-1, 0))
H, W = map(int, input().split())
visited = [0]*(H*W)
q = deque()

for i in range(H):
    line = input()
    for j in range(W):
        if line[j] == '#':
            q.append((i, j, 0))
            visited[i*H+j] = 1

res = 0

while q:
    y, x, lv = q.popleft()
    if lv > res:
        res = lv

    for dy, dx in dyx:
        ny, nx = y+dy, x+dx
        if 0 <= ny < H and 0 <= nx < W and visited[ny*H+nx] == 0:
            visited[ny*H+nx] = 1
            q.append((ny, nx, lv+1))

print(res)


### FIXED CODE ###

from collections import deque

dyx = [(0, 1), (0, -1), (1, 0), (-1, 0)]
H, W = map(int, input().split())
edge = ['#']*(W+2)
field = [edge]
q = deque()

for i in range(H):
    field.append(['#'] + list(input()) + ['#'])
    for j in range(W):
        if field[i+1][j+1] == '#':
            q.append((i+1, j+1, 0))
field.append(edge)
res = 0

while q:
    y, x, lv = q.popleft()
    res = max(lv, res)

    for dy, dx in dyx:
        if field[y+dy][x+dx] == '.':
            field[y+dy][x+dx] = '#'
            q.append((y+dy, x+dx, lv+1))

print(res)
t=input()
d={}
n=0
s=0
w=0
e=0
for i in range(int(len(s))):
    if t[i] =="N":
        n=1
    if t[i] =="S":
        s=1
    if t[i] =="E":
        e=1
    if t[i] =="W":
        w=1
if (w+e)%2==0 and (n+s)%2==0:
    print("Yes")
else:
    print("No") 

### FIXED CODE ###

t=input()
n=0
s=0
w=0
e=0
for i in range(int(len(t))):
    if t[i] =="N":
        n=1
    if t[i] =="S":
        s=1
    if t[i] =="E":
        e=1
    if t[i] =="W":
        w=1
if (w+e)%2==0 and (n+s)%2==0:
    print("Yes")
else:
    print("No")
a,b=map(int,input(),split())
for i in range(2*a-1):
  print(b-a+1,end="")

### FIXED CODE ###

a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
N = int(input())
S = sorted([int(input()) for _ in range(N)])
s = sum(S)
if s % 10 != 0:
    print(s)
    exit()

for si in range(S):
    if si % 10 != 0:
        print(s - si)
        exit()

print(0)


### FIXED CODE ###

N = int(input())
S = sorted([int(input()) for _ in range(N)])
s = sum(S)
if s % 10 != 0:
    print(s)
    exit()

for si in S:
    if si % 10 != 0:
        print(s - si)
        exit()

print(0)
IN = iter(Input.split('\n')).__next__
def input():
    return IN()

# 入力
from collections import deque
h, w = map(int, input().split())
c = []
for _ in range(h):
    c.append(input())

ans = 0
for i in range(h):
    for j in range(w):
        if c[i][j] == ".": ans+=1

d = [[-1]*w for _ in range(h)]
d[0][0] = 1
que = deque([[0, 0]])
while que:
    x, y = que.popleft()
    for i, j in [[1,0],[0,1],[-1,0],[0,-1]]:
        nx, ny = x+i, y+j
        if 0<=nx<w and 0<=ny<h and c[ny][nx]=="." and d[ny][nx]==-1:
            d[ny][nx] = d[y][x]+1
            que.append([nx, ny])
if d[h-1][w-1] == -1:
    print(-1)
else:
    print(ans-d[h-1][w-1])

### FIXED CODE ###

from collections import deque
h, w = map(int, input().split())
c = []
for _ in range(h):
    c.append(input())

ans = 0
for i in range(h):
    for j in range(w):
        if c[i][j] == ".": ans+=1

d = [[-1]*w for _ in range(h)]
d[0][0] = 1
que = deque([[0, 0]])
while que:
    x, y = que.popleft()
    for i, j in [[1,0],[0,1],[-1,0],[0,-1]]:
        nx, ny = x+i, y+j
        if 0<=nx<w and 0<=ny<h and c[ny][nx]=="." and d[ny][nx]==-1:
            d[ny][nx] = d[y][x]+1
            que.append([nx, ny])
if d[h-1][w-1] == -1:
    print(-1)
else:
    print(ans-d[h-1][w-1])
n,m = [int(x) for x in input().split()]
py = []
for i in range(m):
    p,y = [int(x) for x in input().split()]
    py.append([p,y,i+1])

def zero(num):
    return str(num).zfill(6)


if m == 1:
    print(zero(1)+zero(1))
else:
    year_py = sorted(py, key=lambda x: x[1])
    dic = {x: 0 for x in range(m)}

    for i in range(m):
        dic[year_py[i][0]] += 1
        year_py[i].append(dic[year_py[i][0]])
    yb_py = sorted(year_py, key=lambda x: x[2])

    for i in range(m):
        print(zero(yb_py[i][0]) + zero(yb_py[i][3]))

### FIXED CODE ###

n,m = [int(x) for x in input().split()]
py = []
for i in range(m):
    p,y = [int(x) for x in input().split()]
    py.append([p,y,i+1])

def zero(num):
    return str(num).zfill(6)


if m == 1:
    print(zero(py[0][0])+zero(1))
else:
    year_py = sorted(py, key=lambda x: x[1])
    dic = {str(x): 0 for x in range(1,n+1)}

    for i in range(m):
        dic[str(year_py[i][0])] += 1
        year_py[i].append(dic[str(year_py[i][0])])
    yb_py = sorted(year_py, key=lambda x: x[2])

    for i in range(m):
        print(zero(yb_py[i][0]) + zero(yb_py[i][3]))
print((lambda a,b : (a+b)//24)(list(map(int,input().split())) ))

### FIXED CODE ###

print((lambda a : (a[0]+a[1])%24)(list(map(int,input().split())) ))
def e(x,y):
 A[y][x]='0'
 for dx,dy in[(i,0),(0,i)for i in range(-3,4)]:
  if 0<=x+dx<8 and 0<=y+dy<8 and A[y+dy][x+dx]=='1':e(x+dx,y+dy)

for i in range(int(input())):
 print(f'Data {i+1}:')
 input()
 A=[list(input())for _ in[0]*8]
 e(int(input())-1,int(input())-1)
 for r in A:print(*r,sep='')


### FIXED CODE ###

def b(x,y):
 A[y][x]='0'
 for d in range(-3,4):
  0<=x+d<8and'1'==A[y][x+d]and b(x+d,y)
  0<=y+d<8and'1'==A[y+d][x]and b(x,y+d)
e=input
for i in range(int(e())):
 print(f'Data {i+1}:')
 e()
 A=[list(e())for _ in[0]*8]
 b(int(e())-1,int(e())-1)
 for r in A:print(*r,sep='')
#!/usr/bin/env python
# coding: utf-8

# In[14]:


S=input()
t=list()
ct=0
for i in range(len(S)-1):
    if S[i]=='A' or S[i]=='C' or S[i]=='T' or S[i]=='G':
        i+=1
        ct+=1
    else:
        t.append(ct)
        ct=0
        i+=1
print(max(t))


# In[ ]:






### FIXED CODE ###

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

# In[21]:


S=input()
t=list()
ct=0
for i in range(len(S)):
    if S[i]=='A' or S[i]=='C' or S[i]=='T' or S[i]=='G':
        i+=1
        ct+=1
    else:
        t.append(ct)
        ct=0
        i+=1
t.append(ct)
print(max(t))


# In[ ]:
s = map(input().split())
print(sum(s))

### FIXED CODE ###

print(input().count('1'))
a = input().split(" ")
n = int(a[0])
b = int(a[1])
r = int(a[2])
c = a // (b + r)
bb = c * b
d = a % (b + r)
if d >= b:
	bb += b
else:
	bb += d 
print(bb)

### FIXED CODE ###

a = input().split(" ")
n = int(a[0])
b = int(a[1])
r = int(a[2])
c = n // (b + r)
bb = c * b
d = n % (b + r)
if d >= b:
	bb += b
else:
	bb += d 
print(bb)
n=int(input())
A=list(map(int,input().split()))
Aabs=map(abs,A)

fu=0
for i in range(N):
  if A[i]<0:
    fu+=1
if fu % 2 == 0:
  print(sum(Aabs))
else:
  print(sum(Aabs)-2*min(Aabs))

### FIXED CODE ###

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

fu=0
for i in range(N):
  if A[i]<0:
    fu+=1
if fu % 2 == 0:
  print(sum(Aabs))
else:
  print(sum(Aabs)-2*min(Aabs))
def main():
    input()
    t = list(map(int, input().split()))
    col = collections.Counter(t)
    com = {}
    al = 0
    for key in col:
        com[key] = combinations_count(col[key], 2)
        al += com[key]
    for v in t:
        c = col[v] - 1
        if c <= 1:
            c = 0
        else:
            c = combinations_count(c, 2)
        tmp = (al - com[v]) + c
        print(tmp)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import collections
import math

url = "https://atcoder.jp//contests/abc159/tasks/abc159_d"


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def main():
    input()
    t = list(map(int, input().split()))
    col = collections.Counter(t)
    com = {}
    al = 0
    for key in col:
        if col[key] < 2:
            com[key] = 0
        else:
            com[key] = combinations_count(col[key], 2)
        al += com[key]
    for v in t:
        c = col[v] - 1
        if c <= 1:
            c = 0
        else:
            c = com[v] - c
        tmp = (al - com[v]) + c
        print(tmp)


if __name__ == '__main__':
    main()
a=input()
b=input()
c={}
state=True
for i in range(len(a)):
  if b[i] not in c:
    c[b[i]]=a[i]
  if b[i] in c:
    if c[b[i]]!=a[i]:
    state=False
  else:
    state=False
if state:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a=input()
b=input()
c={}
state=True
for i in range(len(a)):
  if b[i] not in c and a[i] not in c.values():
    c[b[i]]=a[i]
  if b[i] in c:
    if c[b[i]]!=a[i]:
      state=False
  else:
    state=False
if state:
  print('Yes')
else:
  print('No')
n = int(input())
a = input().split()
a_int = [int(n) for n in a]
ans = 1
for num in a_int:
    if ans > 10**18:
        print(-1)
        exit()
    else:
        ans *= num
print(ans)

### FIXED CODE ###

a = input().split()
b = int(a[0])
c = float(a[1])
c = round(c*100)

ans = b*c // 100
print(int(ans))
H, N,  = map(int, input().split())

Damage = []
for i in range(1,N+1):
    Ai = int(input())
    Damage.append(Ai)
Total_Damage = sum(Damage)

if H <= Total_Damage:
    print("Yes")
else:
    print("No")
    

### FIXED CODE ###

H, N = map(int, input().split())
A_list = []
for i in range(1, N+1):
    A_list.append("A_" + str(i))

A_list = map(int, input().split())
A_total = sum(A_list)

if A_total >= H:
    print("Yes")
else:
    print("No")
import sys
sys.setrecursionlimit(1000000)
input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
INF = 500000
mod = 10**9+7

a, b, c = map(int, input().split())
if a*a+b*b+c*c > 2*(a*b+b*c+c*a) and c > 4:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
input = sys.stdin.readline
from bisect import *
from collections import *
from heapq import *
INF = 500000
mod = 10**9+7

l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())-1
print(l[K])

# a, b, c = input(), input(), input()
# la, lb, lc = len(a), len(b), len(c)
# for i in range(1, min(la, lb)):
#     S = ''
#     for j in range(i):
#         if a[la-i+j] == b[j]:
#             S += b[j]
#             continue
#         elif a[la-i+j] == '?':
#             S += b[j]
#         elif b[j] == '?':
#             S += c[j]
def divide(num):
    return b//num - (a-1)//num
import math
a,b,c,d=map(int,input().split())
lcm=c*d//math.gcd(c,d)
print(b - (a - 1) - (divide(c) + divide(d) - divide(lcm)))

### FIXED CODE ###

def divide(num):
    return b//num - (a-1)//num
import fractions
a,b,c,d=map(int,input().split())
lcm=c*d//fractions.gcd(c,d)
print(b - (a - 1) - (divide(c) + divide(d) - divide(lcm)))
facts = [1]
mod =  10**9 + 7
for i in range(1, 2010):
	facts.append((i*facts[-1])%mod)
modinv = []
for i in facts:
	modinv.append(pow(i, mod - 2, mod))

def choose(p, r):
	return (((facts[p]*modinv[r])%mod)*modinv[p-r])%mod

n, k = map(int, raw_input().split())
blue = k
red = n - k
for i in range(1, k+1):
	if i <= n - k + 1:
		print (choose(red + 1, i)*choose(k - 1, i - 1))%mod
	else:
		print 0

### FIXED CODE ###

s = list(raw_input())
s.sort()
if s[0] == s[1] and s[2] == s[3] and s[1] != s[2]:
	print "Yes"
else:
	print "No"
import math

def main():
    n = int(input())
    print(int(2*n/math.gcd(2, n)))

if __name__ == '__main__':
    main()


### FIXED CODE ###

import fractions

def main():
    n = int(input())
    print(int(2*n/fractions.gcd(2, n)))


if __name__ == '__main__':
    main()
x,y=map(input().split())
s="ABCDEF"
for i in range(0,6):
  if s[i]==x:
    x=int(i)
  if s[i]==y:
    y=int(i)
if x>y:
  print(">")
elif x<y:
  print("<")
else:
  print("=")

### FIXED CODE ###

x,y=input().split()
s="ABCDEF"
for i in range(0,6):
  if s[i]==x:
    x=int(i)
  if s[i]==y:
    y=int(i)
if x>y:
  print(">")
elif x<y:
  print("<")
else:
  print("=")