peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N,M = [int(x) for x in input().split()]
ac = [0]*(N+1)
wa = [0]*(N+1)
for i in range(M):
  p,s = input().split()
  if s =="AC" and ac[int(p)]==0:
    ac[int(p)]=1
  if s=="WA" and ac[int(p)]==0:
    wa[int(p)]+=1
ans = 0
answa = 0
for i in range(N+1):
  if ac[i]==1:
    ans+=1
    answa+=wa[i] 
print(ans,answa)
# Judge status: Accepted
N,M  =map(int,input().split())

if N==1 and M==1: print(1);exit()
if N==1 and M==2: print(0);exit()
if N==2 and M==1: print(0);exit()
if N==1: print(M-2);exit()
if M==1:print(N-2);exit()
if N==2 or M==2:print(0);exit()
else: print((N-2)*(M-2))
# Judge status: Wrong Answer
n, k, s = map(int, input().split())

for i in range(1, n+1):
    if i <= k+1:
        if s %2 == 1 and i % 2 == 1:
            print(s//2 + 1)
        else:
            print(s//2)
    else:
        if s == 10**9:
            print(1)
        else:
            print(10**9)
# Judge status: Accepted
l,r=map(int,input().split())
import sys
mod=2019
ans=float('inf')

for i in range(l,r+1):
  for j in range(i+1,r+1):
    ans=min((i*j)%mod,ans)
    if ans==0:
      print(0)
      sys.exit()
print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

a.sort()
a_max = a[-1]
ban = [0]*(a_max+1)

count = 0
for i in range(n):
    if ban[a[i]]:
        continue
    else:
        if i == n-1 or a[i+1] != a[i]:
            count += 1
        x = a[i]
        while x <= a_max:
            ban[x] = 1
            x += a[i]
#print(ban)
print(count)
# Judge status: Accepted
n = int(input())
ans = []
#now = (-2)^n = 1,-2,4,-8,16....
now = 1
while n != 0:
    if n % (abs(now) * 2) == 0:
        ans.append("0")
    else:
        ans.append("1")
        n -= now

    now *= -2
    #print(n, now, ans)

if ans == []:
    print(0)
else:
    out = ""
    for i in range(len(ans) - 1, -1, -1):
        out += ans[i]

    print(out)
# Judge status: Wrong Answer
n, m = map(int, input().split())
if n//2 >= m:
    print(m)
else:
    print(n+(m-2*n)//4)
# Judge status: Accepted
a = [list(map(int,input().split()))for i in range(3)]
raw = []
for i in range(3):
    raw.append([a[i][0],a[i][1],a[i][2]])
    raw.append([a[0][i],a[1][i],a[2][i]])
raw.append([a[0][0],a[1][1],a[2][2]])
raw.append([a[0][2],a[1][1],a[2][0]])
cnt = [0]*8
n = int(input())
for i in range(n):
    b = int(input())
    for j in range(8):
        if b in raw[j]:cnt[j]+=1
cnt.sort()
if cnt[-1] == 3:print("Yes")
else:print("No")
# Judge status: Accepted
a = int(input())
print(a*a*a+a*a+a)
# Judge status: Accepted
N = int(input())

if N == 1:
    print(1)
else:
    L = [0] * (N + 1)
    L[0] = 2
    L[1] = 1
    for i in range(2, N + 1):
        L[i] = L[i - 1] + L[i - 2]
    print(L[N])
# Judge status: Wrong Answer
def main():
    n=int(input())
    print(n//2+n%2)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
p,q,r = map(int, input().split())
# p,q,r = map(int, "1 3 4".split())
print(r-q + r-p)
# Judge status: Wrong Answer
N,R = [int(i) for i in input().split()]

if N < 10:
    print(R + (100 * (N- 2)))
else:
    print(R)
# Judge status: Accepted
N, K = map(int, input().split())
A = [int(i) for i in input().split()]

for i in range(K, N):
    prev = A[i - K]
    curr = A[i]
    if prev < curr:
        print('Yes')
    else:
        print('No')
# Judge status: Wrong Answer
k = int(input())
if(k % 2 == 0):
  print(-1)
else:
  if(k % 7 == 0):
    print(1)
  else:
    a = 1
    amari = 7 % k
    while(a < k):
      a += 1
      amari = (amari*10 + 7) % k
      if(amari == 0):
        print(a)
        break
    if(a == k):
      print(-1)
# Judge status: Accepted
K = int(input())

from collections import deque

d = deque()
d = deque([1,2,3,4,5,6,7,8,9])
n = 0

for i in range(K-1):
  x = d[0]
  if not x % 10 == 0:
    d.append((10 * x) + (x % 10) - 1)
    
  d.append((10 * x) + (x % 10))
  
  if not x % 10 == 9:
    d.append((10 * x) + (x % 10) + 1)
    
  d.popleft()

print(d[0])
# Judge status: Accepted
k, a, b = map(int, input().split())
if 2 >= b-a  or a >= k:
    print(k+1)

else:
    print(b + ((k-a+1)//2-1)*(b-a) + ((k-a+1)%2))
# Judge status: Accepted
def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    from collections import Counter
    ans = 0
    c = Counter(A)
    for k, v in c.items():
        if k < v:
            ans += v - k
        elif v < k:
            ans += v
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
arr=list(map(int,input().split()))
cnt=0
if(arr[0]==arr[1]):
  cnt+=1
if(arr[0]==arr[2]):
  cnt+=1
if(arr[1]==arr[2]):
  cnt+=1
if(cnt==3):
  print("NO")
else:
  print("Yes")
# Judge status: Wrong Answer
a,b,c,d,e,f = [ int(input()) for i in range(6) ]

if b-a<=f and c-b<=f and d-c<=f and e-d<=f:
  print("Yay!")
 
else:
  print(":(")
# Judge status: Wrong Answer
import itertools

abcd = []
N,M,Q = map(int,input().split())
for i in range(Q):
    a,b,c,d = map(int,input().split())
    abcd.append([a,b,c,d])
  
A = (list(itertools.permutations(list(range(1,M+1)),N)))

ans = 0
for i in A: #(1,2,3,4)
    _sum = 0
    for j in abcd: #[2 4 1 86568]
        if i[j[1]-1] - i[j[0]-1] == j[2]:
            _sum += j[3]
    if ans < _sum:
        ans = _sum
    
print(ans)
# Judge status: Accepted
#copy

s = input()
print("Yes" if len(set(s)) == 2 else "No")
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
l = [a[i]-i-1 for i in range(n)]
b = sorted(l)[n//2]
ans = 0
for i in range(n):
    ans += abs(a[i]-b-i-1)
print(ans)
# Judge status: Wrong Answer
a,b = map(int, input().split())
print(a%b)
# Judge status: Accepted
n, k = map(int, input().split())

mod = 10**9 + 7
n_list = [0]*(n+1)
for i in range(n+1):
    n_list[i] = (10**100 + i) % mod

s = [0]*(n+1)
s[0] = n_list[0]

for i in range(1, n+1):
    s[i] = (s[i-1] + n_list[i]) % mod
#print(s)

count = 0
for i in range(k, n+1):
    min_sum = s[i-1] % mod
    max_sum = (s[n] - s[n-i]) % mod
    m = (max_sum - min_sum) + 1 % mod
    count += m
count += 1  # k=n+1の分
print(count % mod)
# Judge status: Wrong Answer
from bisect import bisect_left, bisect_right

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

A.sort()
C.sort()

cnt = 0
for b in B:
    cnt += bisect_left(A, b) * bisect_right(C, b)
print(cnt)
# Judge status: Wrong Answer
N = input()
A = list(map(int, input().split()))

num = round(sum(A) // len(A))
cost = [(a - num)**2 for a in A]

print(sum(cost))
# Judge status: Wrong Answer
n,m=map(int,input().split())
a=sorted(map(int,input().split()))
c={}
for _ in range(m):
    bx, cx =map(int,input().split())
    c[cx]=bx
c_sort=dict(sorted(c.items(),reverse=1))

c_list=[]
for j in c_sort:
  for _ in range(c_sort[j]):
    if len(c_list)>=n+1:
      break
    c_list.append(j)

c_len=len(c_list)
sum=0

for i in range(n):
    if i+1<=c_len:
        sum+=max(a[i],c_list[i])
    else:
        sum+=a[i]
print(sum)
# Judge status: Wrong Answer
n, m = map(int, input().split())
p = [list(map(int, input().split())) for i in range(n + m)]
for a, b in p[:n]:
  x = [abs(a - c) + abs(b - d) for c, d in p[n:]]
print(x.index(min(x)) + 1)
# Judge status: Accepted
N = int(input())
a = (N * (N + 1)) // 2
print(a)
# Judge status: Accepted
import collections
n = int(input())
c = collections.Counter([ input() for i in range(n) ])
ma = max(c.values())
print(*sorted([ i for i, j in c.items() if j == ma ]), sep='\n')
# Judge status: Accepted
n, l = map(int, input().split())
apple = list(range(l, l + n))
ans = 0
if 0 in apple:
  ans = sum(apple)
elif abs(apple[0]) < abs(apple[-1]):
  ans = sum(apple[1:])
else:
  ans = sum(apple[:-1])
print(ans)
# Judge status: Wrong Answer
s = input()
n = len(s)


def f(s):
    n = len(s)
    if n % 2 == 0:
        return s[:n // 2] == s[n // 2:]
    else:
        return s[:n // 2] == s[n // 2 + 1:]


if f(s) and f(s[:(n - 1)//2 + 1]) and f(s[(n + 3) // 2 - 1:]):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
x = input()
youbi = {
  'SUN': 7
  , 'MON': 6
  , 'TUE': 5
  , 'WED': 4
  , 'THU': 3
  , 'FRI': 2
  , 'SAT': 1
}
print(youbi[x])
# Judge status: Accepted
x = []
for i in range(4):
    x.append(int(input()))
if x[0] > x[1]:
    print(x[1]*x[2]+(x[0]-x[1])*x[3])
else:
    print(x[0]*x[2])
# Judge status: Wrong Answer
n,k = map(int,input().split())
for i in range(1,10 ** 9):
    if n - k ** i < k:
        print(i)
        break
# Judge status: Accepted
S = input()

ans = 'AC'

if S[:1] != 'A':
    print('WA')
    exit()

if S[2:-1].count('C') != 1:
    print('WA')
    exit()

X = S[1:].split('C')
for x in X:
    if x.islower():
        pass
    else:
        print('WA')
        exit()

print(ans)
# Judge status: Wrong Answer
n, k, q = map(int, input().split())

scores = {i: 0 for i in range(1, n+1)}
for _ in range(q):
    n = int(input())
    scores[n] += 1

print(scores)
for i, score in sorted(scores.items()):
    if k + score - q > 0:
        print('YES')
    else:
        print('NO')
# Judge status: Wrong Answer
n = int(input())
l = [0 for _ in range(n+1)]
l[1] = 1

for i in range(n+1):
    for j in range(i-1, 0, -1):
        if i % j == 0:
            l[i] = l[j] + 1
            break

ans = 0
for k in range(n+1):
    print(k * l[k])
    ans += (k * l[k])

print(ans)
# Judge status: Wrong Answer
n, k = map(int, input().split())
print(n/k if n%k==0 else 1)
# Judge status: Accepted
from math import ceil, floor

n = int(input())
res = ceil(n/1.08)
if floor(res*1.08) == n:
    print(res)
else:
    print(":(")
# Judge status: Accepted
import math
a , b , k = map(int , input().split())
ans = set()
for i in range(min(k , math.ceil((b - a + 1) / 2))):
  ans.add(a + i)
  ans.add(b - i)
ans = sorted(list(ans))
print('\n'.join([str(n) for n in ans]))
# Judge status: Accepted
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	A, B, M = getlist()
	a = getlist()
	b = getlist()
	am = min(a)
	bm = min(b)
	ans = am + bm
	for i in range(M):
		x, y, c = getlist()
		ans = min(ans, a[x - 1] + b[y - 1] - c)

	print(ans)
	


if __name__ == '__main__':
	main()
# Judge status: Accepted
n = int(input())

from collections import defaultdict
d = defaultdict(int)

ul=int(n**0.5)

for i in range(1,ul):
  for j in range(1,ul):
    for k in range(1,ul):
      d[i**2+j**2+k**2+i*j+j*k+k*i]+=1
for j in range(1,n+1):
  print(d.get(j,0))
#  print(d[j] if d[j] else 0)
# Judge status: Accepted
S = input()
T = input()
N = len(S)

start = [-1 for i in range(26)]
goal = [-1 for i in range(26)]
a = ord('a')
ans = 'Yes'
for i in range(N):
    s = ord(S[i])-a
    t = ord(T[i])-a
    if start[s] != -1 and start[s] != t:
        ans = 'No'
    if goal[t] != -1 and goal[t] != s:
        ans = 'No'
    start[s] = t
    goal[t] = s

print(ans)
# Judge status: Accepted
n, a, b = map(int, input().split())
good = n//(a+b)*a
resd = min(a, n%(a+b))
print(good+resd)
# Judge status: Wrong Answer
n, y = map(int, input().split())

ans = 0

t = int(y/10000)
y -= t*10000

f = int(y/5000)
y -= f*5000

h = int(y/1000)
y -= h*1000

if t+f+h != n or y != 0:
    print("-1 -1 -1")
else:
    print(t,f,h)
# Judge status: Wrong Answer
a=int(input())
b=int(input())
h=int(input())
print(int((a+b)*h/0.5))
# Judge status: Wrong Answer
s = input()


l = s[0]
i = 1
c = 1
while(i < len(s)-1):
    if(s[i] == l):
        l = s[i:i+2]
        i += 2
        c += 1
    else:
        l = s[i]
        i += 1
        c += 1
if(s[-1] != l):c += 1
print(c)
# Judge status: Accepted
N = int(input())
ans = ""

if N==0:
  print(0)
else:
  while N!=0:
    ans+=str(N%2)
    N=-(N//2)
  print(ans[::-1])
# Judge status: Wrong Answer
X,Y=map(int,input().split())
MOD=10**9+7

def modinv(a):
    return pow(a,MOD-2,MOD)

if (2*X-Y)%3!=0 or (2*Y-X)%3!=0:
    print(0)
else:
    x=(2*Y-X)//3
    y=(2*X-Y)//3
    r=1
    n=x+y
    k=min(x,y)
    for i in range(k):
        r*=(n-i)
        r*=modinv(i+1)
        r%=MOD
    print(r)
# Judge status: Accepted
n,a,b=map(int,input().split())

kuri=n//(a+b)
ama=n%(a+b)
ans=kuri*a+min(a,ama)
print(ans)
# Judge status: Accepted
n = int(input())
key = dict()

for i in range(n):
  a = int(input())
  if a not in key:
    key[a] = 1
  elif key[a] == 1:
    key[a] = 0
  else:
    key[a] = 1

ans = 0
for value in key.values():
  ans += value
print(ans)
# Judge status: Accepted
s=set(input())
print(["No","Yes"][len(s)==3])
# Judge status: Wrong Answer
import math

n = 10**5+1

x = int(input())

nums = [1 for i in range(n)]

for i in range(2, int(math.sqrt(n))):
  if nums[i] == 0:
    continue
  if (i>x):
    print(i)
    exit()
  for j in range(i+1, n):
    if j%i==0:
      nums[j] = 0
# Judge status: Accepted
N, K = list(map(int, input().split()))

ans = N % K if N%K < abs( N%K -K) else abs( N%K -K)

print(ans)
# Judge status: Accepted
a = int(input())
b = int(input())
h = int(input())
S = (a+b)*h//2
print(S)
# Judge status: Accepted
s = list(input())
k = int(input())
ans = "1"
cnt = 0
for i in s:
    if i == "1":
        cnt += 1
    elif cnt < k:
        ans = str(i)
        break
print(ans)
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n, k, *a = map(int, readline().split())
print((n - 2) // (k - 1) + 1)
# Judge status: Wrong Answer
s = input()
ans = 0
for i in range(len(s)):
  if ans != 0:
    print('No')
    exit()
  if i % 2 == 0:
    if s[i] == 'L':
      ans += 1
  else:
    if s[i] == 'R':
      ans += 1
print('Yes')
# Judge status: Accepted
n,k = map(int,input().split())
A = list(map(int, input().split()))

from itertools import accumulate
for i in range(k):
    imos = [0]*(n+1)
    for j in range(n):
        d = A[j]
        l = max(0, j-d)
        r = min(n-1, j+d)
        imos[l] += 1
        imos[r+1] -= 1
    imos = list(accumulate(imos))
    for j in range(n):
        A[j] = imos[j]
    if A == [n]*n:
        break

print(*A)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
ans = 0
for i in range(n):
    ans += a[2 * i + 1]
print(ans)
# Judge status: Accepted
x,y=map(int,input().split())
n=x+y
if x/y>2 or y/x>2 or n%3!=0:
    print(0)
    exit()
n//=3
r=min(x-n,y-n)
m=10**9+7
a=b=1
for i in range(r):
    a=a*(n-i)%m
    b=b*(i+1)%m
print(a*pow(b,m-2,m)%m)
# Judge status: Accepted
s = input()
l = ["A", "C", "G", "T"]
ans = 0
c = 0

for i in range(len(s)):
    if s[i] in l:
        c += 1
        if c > ans:
            ans = c
    else:
        c = 0

print(ans)
# Judge status: Accepted
from collections import deque

n, m = map(int, input().split())
root = [[] for _ in range(n)]
adj = [-1 for _ in range(n)]
for _ in range(m):
  r,c = map(int, input().split())
  root[r-1].append(c-1)
  root[c-1].append(r-1)
  
explor = deque()
explor.append(0)

while explor:
  tmp = explor.popleft()
  for i in root[tmp]:
    if adj[i]==-1:
      adj[i] = tmp
      explor.append(i)

print('Yes')
for i in adj[1:]:
  print(i+1)
# Judge status: Accepted
N,R=map(int,input().split())
if N >= 10:
    print(R)
else:
    print(R+(100*(10-N)))
# Judge status: Accepted
N = int(input())
a = list(map(int,input().split()))

count = 0

while True:
    #リストの中をすべて2で割る
    odd_cnt = 0
    for i in range(N):
        if a[i] % 2 == 1:
            odd_cnt += 1
        a[i] = a[i] / 2
    
    #奇数が一つでもあればbreak. そうでなければカウント追加してループ続行
    if odd_cnt > 0:
        break
    else:
        count += 1

print(count)
# Judge status: Accepted
n,k=map(int,input().split())
ans=[1]*n
for i in range(k):
  d=int(input())
  a=list(map(int,input().split()))
  for i in range(d):
    ans[a[i]-1]=0
print(sum(ans))
# Judge status: Accepted

def main():
  from itertools import groupby

  s = list(input())
  f = 0
  ans = 0

  for k,v in groupby(s):
    d = len(tuple(v))
    left = d if k==">" else 0
    right = d if k=="<" else 0
    if f>left:
      ans += d*(d+1)//2 - left
    else:
      ans += -1*f + d*(d+1)//2  
    f = right 

  print(ans) 

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
a,b,c,x =[int(input(i)) for i in range(4)]
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*i+100*j+50*k==x:
                ans+=1
print(ans)
# Judge status: Wrong Answer
O = input()
E = input()
print(*[O+E for O,E in zip(O,E)], sep='')
# Judge status: Wrong Answer
def func(a):
  if a in (1,3,5,7,8,10,12):
    return "a"
  elif a in (4,6,9,11):
    return "b"
  else:
    return "c"

x, y = [int(i) for i in input().split()]

x_group = func(x)
y_group = func(x)

if x_group == y_group:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
cnt = 0
s = set()
for i in range(1, N+1):
    cnt += i
    s.add(i)
    if cnt>=N:
        break
if N!=cnt:
    s.remove(cnt-N)

for i in s:
    print(i)
# Judge status: Wrong Answer
n = int(input())
s = 0
for i in range(n+1):
  if i % 3 != 0 or i % 5 != 0:
    s += i
print(s)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))
Ad = {a:0 for a in set(A)}
if len(set(A)) <= K:
    print(0)
else:
    cnt = 0
    for a in A:
        Ad[a] += 1
    Ad = sorted(Ad.items(), key=lambda x: x[1])
    for i in range(len(set(A))-K):
        cnt += Ad[i][1]
    print(cnt)
# Judge status: Accepted
Q,H,S,D = map(int, input().split())
N = int(input())

H = min(H, Q * 2)
S = min(S, H * 2)
D = min(D, S * 2)

#print(S, D)

ans = (N // 2) * D + (N - (N // 2) * 2) * S
print(ans)
# Judge status: Wrong Answer
def get_digit_sum(n):
    result = 0
    while n > 0:
        result += n % 10
        n //= 10
    return result


def main():
    ab_sum = int(input())
    answer = float("inf")
    for i in range(1, ab_sum // 2):
        answer = min(answer, get_digit_sum(i) + get_digit_sum(ab_sum - i))
    print(answer)


if __name__ == '__main__':
    main()
# Judge status: Accepted
A,B,C = map(int, input().split())
print(C-(A-B) if C > (A-B) else 0)
# Judge status: Accepted
from collections import deque
s=deque(input());q=int(input());rev=0
for i in range(q):
    p=list(map(str,input().split()))
    if p[0]=="1":rev^=1
    else:
        z,f,c=p
        if f=="1":
            if rev:s.append(c)
            else:s.appendleft(c)
        else:
            if rev:s.appendleft(c)
            else:s.append(c)
s=list(s)[::1-2*rev]
print("".join(s))
# Judge status: Accepted
N = int(input())

s = [input() for i in range(N)]

from collections import Counter

sc = Counter(s)
M = int(input())
for i in range(M):
    sc[input()] -= 1
print(max(0,max(sc.values())))
# Judge status: Wrong Answer
s=input()
l=list(map(int,s.split("/")))
if l[0] <=2018 or l[0] ==2019 and (l[1]<=3 or l[1] ==4 and l[2]<=30):
    print('TBD')
else:
    print("Heisei")
# Judge status: Wrong Answer
N = int(input())
R = [None] * (N+1)

R[0] = 2
if N == 0:
    print(R[0])
    exit()
R[1] =1
if N == 1:
    print(R[1])
    exit()
if N > 2:
    for i in range(2, N+1):
        R[i] = R[i-1] + R[i-2]
    print(R[N])
# Judge status: Accepted
a=int(input())
print( a+a*a + a*a*a)
# Judge status: Accepted
# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for x in combinations(l, 3):
    if x[0]!=x[1] and x[0]!=x[2] and x[1]!=x[2]:
        if x[0] + x[1] > x[2]:
            ans+=1
print(ans)
# Judge status: Accepted
a, b = map(int, input().split())

res = 0
for i in range(b-a):
    res += i
print(res - a)
# Judge status: Accepted


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    return ''.join([c[0] for c in input().strip().split(' ')])


if __name__ == '__main__':
    print(solve())
# Judge status: Accepted
from collections import Counter
from functools import reduce
from operator import mul


def plus_one(n):
    return n + 1


N = int(input())
S = Counter(list(input()))

print((reduce(mul, map(plus_one, S.values())) - 1) % (10 ** 9 + 7))
# Judge status: Wrong Answer
mondaisu , teisyutukaisu = map(int,input().split())

flag = []
penalog = []

for i in range(mondaisu):
  flag.append(0)
  penalog.append(0)



for i in range(teisyutukaisu):
  bango , kekka = input().split()
  bango = int(bango)
  if flag[bango-1] == 1:
    continue
  if kekka == 'WA':
    penalog[bango-1] = penalog[bango-1] + 1
  if kekka == 'AC':
    flag[bango-1] = 1
  
print(sum(flag),sum(penalog))
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

b = [-1] * n
for i in range(n, 0, -1):
    cnt = sum(b[j - 1] for j in range(i + i, n + 1, i))
    b[i - 1] = int(a[i - 1] != cnt % 2)

print(sum(b))
if sum(b) > 0:
    print(*[i + 1 for i in range(n) if b[i] == 1])
# Judge status: Wrong Answer
N = input()
a = 0

for i in range(len(N)):
  if N[i] == 0:
    continue
  for j in range(len(N)):
    if i > j:
      continue
    if int(N[i:j + 1]) == 0:
      continue
    #print(N[i:j + 1])
    if int(N[i:j + 1]) % 2019 == 0:
      a += 1
      print(N[i:j + 1])

print(a)
# Judge status: Accepted
n = int(input())

for i in range(0, int(100/7)+1):
   x = n - i * 7
   if (x == 0 or x % 4 == 0):
      print('Yes')
      exit()
   elif (x < 4):
      break
print('No')
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))

res = 0
for i in range(n):
    if i + 1 == p[i]:
        res += 1
# print(n, res)
if res >= n - 2:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
w, h, n = map(int, input().split())
left_x = 0
right_x = w
up_y = h
down_y = 0
for _ in range(n):
    x, y, a = map(int, input().split())
    if a == 1:
        left_x = max(left_x, x)
    elif a == 2:
        right_x = min(right_x, x)
    elif a == 3:
        down_y = max(down_y, y)
    else:
        up_y = min(up_y, y)

if right_x - left_x > 0 and up_y - down_y > 0:
    ans = (right_x - left_x) * (up_y - down_y)
else:
    ans = 0
print(ans)
# Judge status: Accepted
n=int(input())
l=[0]*(n)
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            k=x**2+y**2+z**2+x*y+x*z+y*z
            if k<=n:
                l[k-1]+=1
print(*l,sep="\n")
# Judge status: Wrong Answer
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
l = len(str(n)) - 1
if n % 10**l == 0:
    if str(n)[0] == '1':
        print(10)
else:
    ans = 0
    for i in str(n):
        ans += int(i)
    print(ans)
# Judge status: Accepted
x,y = map(int,input().split())

#2^60 = 1,152,921,504,606,846,976 > 10^18である。
for i in range(61):
    if y < x * 2**i:
        print(i)
        exit()
# Judge status: Wrong Answer
N = int(input())
H = list(map(int, input().split()))[::-1]
high = H[0]
for i in range(1, N):
    if high - H[i] < -1:
        print("No")
        exit()
    else:
        high = H[i]
print("Yes")
# Judge status: Accepted
# -*- coding: utf-8 -*-

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


for i in range(len(a) - 1):
    if a[i + 1] < a[i]:
        l.append(a[i]-a[i + 1])
        a[i + 1] = a[i]


print(sum(l))
# Judge status: Accepted
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    x, y, z = MII()
    print(x*y//2)

if __name__ == '__main__':
    main()