Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
bre = []
flag = 0
A = []
for i in range(M):
    bre.append(int(input()))
#print(bre)
A.append(bre[0] - 1)
count = 0
if len(bre) >= 2:
    for i in range(len(bre) - 1):
        a = bre[i + 1] - bre[i]
        A.append(a - 2)
        if a == 1:
            #print(0)
            flag = 1
A.append(N - bre[len(bre) - 1] - 1)

if flag == 0:
    suu = [0, 1, 2]
    for i in range(2, max(A)):
        suu.append(suu[i] + suu[i-1] )
    #print(suu)
    for i in A:
        if count == 0:
            count = suu[i]
        else :
            count *= suu[i]
    print(count % 1000000007)


### FIXED CODE ###

N, M = map(int, input().split())
A = [0 for i in range(N + 2)]
A[0] = 0
A[1] = 1
for i in range(M):
    a = int(input()) + 1
    A[a] = -1
for i in range(2, N+2):
    if A[i] ==  -1:
        A[i] = 0
    else:
        A[i] = A[i-1]+ A[i-2]
        A[i] = A[i] % 1000000007
    #print(A)
print(A[N + 1])
a = [[0]*4 for i in range(3)]
b = [0]*4

n, m = input().split()
for i in range(n):
    a[n] = list(map(int,input().split()))
for j in range(m):
    b[j] = int(input())

c = [0]*3
for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]

for i in c:
    print(i)


### FIXED CODE ###

n, m = map(int,input().split())
a = [[0]*m for i in range(n)]
b = [0]*m

for i in range(n):
    a[i] = list(map(int,input().split()))
for j in range(m):
    b[j] = int(input())

c = [0]*n
for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]

for i in c:
    print(i)
a = int(input())
b = int(input())
print("%d"%(a*b))
print(" %d"%(2*a+2*b))

### FIXED CODE ###

a,b = map(int, raw_input().split())
c = a*b
d = 2*(a+b)
print'%d %d'%(c,d)
n = int(input())
s =[]
for i in range(n):
    s.append(int(input()))
max_s = sum(s)
s.sort()
while str(max_s)[-1] == '0':
    max_s -= s[0]
    s.remove(s[0])
print(max_s)


### FIXED CODE ###

n = int(input())
s =[]
for i in range(n):
    s.append(int(input()))
s.sort()
if sum(s) % 10 != 0:
    print(sum(s))
else:
    a = sum(s)
    for i in range(n):
        if s[i] % 10 != 0:
            a = s[i]
            break
    print(sum(s) - a)
p,a=1,0
n=input()
for i in list(map(int,input().split())):
  if p<=i:ans+=1
  p=i
print(ans)

### FIXED CODE ###

p,a=1,0
n=input()
for i in list(map(int,input().split())):
  if p<=i:a+=1
  p=max(i,p)
print(a)
n, t = map(int, input().split())
A = []
for i in range(n):
  a = list(map(int, input().split()))
  if a[1] =< t:
    A.append(a[0])
if len(A) == 0:
  print('TLE')
else:
  print(min(A))

### FIXED CODE ###

n, t = map(int, input().split())
A = []
for i in range(n):
  a = list(map(int, input().split()))
  if a[1] <= t:
    A.append(a[0])
if len(A) == 0:
  print('TLE')
else:
  print(min(A))
r = input()
print(r ** 2)


### FIXED CODE ###

r = int(input())
print(r**2)
n = int(input())
d = [int(input()) for i in range(n)]

if sum(d)%2 > 0:
    print(-1)
    exit()

d_to_i = {d[i]:i+1 for i in range(n)}
d_set = set(d)
ans = []
while len(ans) < n-1:
    d_max, d_min = max(d_set), min(d_set)
    for m in range(1, n):
        if m*(n-m-1) == d_max-d_min:
            l = n-m-1
            break
    u = d_to_i[d_max]
    for diff in range(1, m+1):
        d_v = d_max - (m*l - (m-diff)*(l-diff))
        v = d_to_i[d_v]
        ans.append((u, v))
        u = v
        if d_v > d_min:
            d_set.remove(d_v)
    d_set.remove(d_max)

for a in ans:
    print(*a)


### FIXED CODE ###

n = int(input())
d = [int(input()) for i in range(n)]

if sum(d)%2 > 0:
    print(-1)
    exit()

d = sorted([(dd, i) for i, dd in enumerate(d)], reverse = True)
d_to_i = {dd:i for dd, i in d}
n_child = [1]*n
d_child = [0]*n
ans = []
for dd, i in d:
    d_i = dd+2*n_child[i]-n
    if d_i in d_to_i.keys():
        i_next = d_to_i[d_i]
        ans.append((i+1, i_next+1))
        n_child[i_next] += n_child[i]
        d_child[i_next] += d_child[i] + n_child[i]
        if n_child[i_next] == n:
            break
    else:
        print(-1)
        exit()

d_min, i_min = d[-1]
if d_min == d_child[i_min]:
    for a in ans:
        print(*a)
else:
     print(-1)
def reconstruct(pre_list, in_list):
    if len(pre_list) <= 1:
        return pre_list
    now = pre_list[0]
    split_place = in_list.index(now)
    pre_left = pre_list[1:split_place + 1]
    in_left = in_list[0:split_place]
    pre_right = pre_list[split_place + 1:]
    in_right = in_list[split_place + 1:]
    return reconstruct(pre_left, in_left) + reconstruct(pre_right, in_right) + [now]

def print_list_split_whitespace(a):
    for x in a[:-1]:
        print(x, end=" ")
    print(a[-1])


n = int(input())
pre_list = [int(x) for x in input().split()]
in_list = [int(x) for x in input().split()]

post_list = reconstruct(pre_list, in_list)
print_list_split_whitespace(post_list)


### FIXED CODE ###

class Node:
    def __init__(self, key):
        self.right = None
        self.left = None
        self.parent = None
        self.key = key

    def preorder(self):
        ret = [self.key]
        if self.left:
            ret += self.left.preorder()
        if self.right:
            ret += self.right.preorder()
        return ret

    def inorder(self):
        ret = []
        if self.left:
            ret += self.left.inorder()
        ret += [self.key]
        if self.right:
            ret += self.right.inorder()
        return ret


class Tree:
    def __init__(self):
        self.root = None

    def insert(self, k):
        z = Node(k)
        y = None
        x = self.root
        while x:
            y = x
            if z.key < x.key:
                x = x.left
            else:
                x = x.right
        z.parent = y
        if y is None:
            self.root = z
        elif z.key < y.key:
            y.left = z
        else:
            y.right = z

    def print(self):
        print('', ' '.join(map(str, self.root.inorder())))
        print('', ' '.join(map(str, self.root.preorder())))


m = int(input())
tree = Tree()
for _ in range(m):
    s = input().split()
    if s[0] == "insert":
        tree.insert(int(s[1]))
    else:
        tree.print()
N = sorted(input().split())
if N[1] == N[2] and (N[0] == N[1] or N[2] == N[3]):
  print('Yes')
else:
  print('No')
 


### FIXED CODE ###

N = input()
if N[1] == N[2] and (N[0] == N[1] or N[2] == N[3]):
  print('Yes')
else:
  print('No')
n,x=map(int,input().split())

def makeBurger(n):
    if n==1:
        return [1,3,1]
    else:
        burger=makeBurger(n-1)
        newBurger=[*burger,1,*burger]
        newBurger[0]+=1
        newBurger[-1]+=1
        # print(newBurger)
        return newBurger

burger=makeBurger(n)
size=0
index=0
cnt=0
while size<=x:
    layerSize=burger[index]
    if index%2:
        if size+layerSize>x:
            cnt+=x-size
            break
        else:
            cnt+=layerSize
    size+=layerSize
    index+=1
print(cnt)


### FIXED CODE ###

n,x=map(int,input().split())

thickness=[1]
for i in range(1,n):
    thickness.append(2*thickness[i-1]+3)
patty=[1]
for i in range(1,n):
    patty.append(2*patty[i-1]+1)


def pattyCnt(n,x):
    if n==0:
        return 0 if x<=0 else 1
    elif x<=1+thickness[n-1]:
        return pattyCnt(n-1,x-1)
    else:
        return patty[n-1]+1+pattyCnt(n-1,x-2-thickness[n-1])

print(pattyCnt(n,x))
s=input()
n = len(s)
check = []
check.append(s)
while True:
    if checkACGT(check[0]):
        print(len(check[0]))
        break
    else:
        if len(check[0]) == 1:
            print(0)
            break
        check.append(check[0][1:])
        check.append(check[0][:len(check[0])-2])
        check.pop(0)

### FIXED CODE ###

def checkACGT(s):
    for i in range(len(s)):
        if s[i] == "A" or s[i] == "G" or s[i] == "C" or s[i] == "T":
            continue
        else:
            return False
    return True

s=input()
n = len(s)
check = []
check.append(s)
while True:
    if not check:
        print(0)
        break
    if checkACGT(check[0]):
        print(len(check[0]))
        break
    else:
        if len(check[0]) == 1:
            check.pop(0)
            continue
        check.append(check[0][1:])
        check.append(check[0][:len(check[0])-1])
        check.pop(0)
N = int( input() )

R = list(range(1,N+1))
L = list(range(1,N+1))

if N==1:

    print(0)

elif N==2:

    print(1)


else:
    R.insert(len(R)-1,R.pop(1))


    print(sum(list(map(lambda x,y: x % y,L,R))))


### FIXED CODE ###

N = int(input())
print( (N *(N-1)) // 2 )
import sys


def Sieve(N, AList):
    AList.sort()
    N_NotDivisible = 0
    while( len(AList) > 0 ):
        if(len(AList) > 1):
            if(AList[0]!= AList[1]):
                N_NotDivisible+= 1
                value = AList[0]
                AList.pop(0)
                AList = [ i for i in AList if i % value != 0 ]
            else:
                index = 1
                while(index < N and AList[0] == AList[index]):
                    index += 1
                for i in range(index):
                    AList.pop(0)

        else:
            N_NotDivisible+= 1
            break
    #print(Mins)
    return N_NotDivisible

if(__name__ == "__main__"):

    N = int( input().strip() )
    AList_str = input().strip().split()

    AList = [0] * N
    for i in range(N):
        AList[i] = int(AList_str[i])
    N_NotDivisible= Sieve(N, AList)
    print(N_NotDivisible)


### FIXED CODE ###

import sys

def Sieve2(N, AList, Bools, Max_A):
    N_NotDivisible = 0
    value = 0
    for i in range(N):
        if(AList[i]>value):
            value = AList[i]
            if(Bools[value]==True):
                N_NotDivisible += 1

            for j in range(2, Max_A//value+1, 1 ):
                Bools[j*value] = False
    #print(Mins)
    return N_NotDivisible


if(__name__ == "__main__"):

    N = int( input().strip() )
    AList_str = input().strip().split()
    Max = 0
    AList = [0] * N
    for i in range(N):
        AList[i] = int(AList_str[i])
        Max = max(AList[i], Max)
    Bools = [False] * (Max+1)
    AList.sort()
    Dups = []
    for Num in range(N):
        value = AList[Num]
        Bools[value] = True
        if(Num < N-1 and AList[Num] == AList[Num+1]):
            Dups.append(value)
    for Num in range(len(Dups)):
        value = Dups[Num]
        Bools[value] = False


    N_NotDivisible= Sieve2(N, AList, Bools, Max)
    print(N_NotDivisible)
a,b = map(int, raw_input().split())

if a==b:
	print("Draw")
else:
	if a!=1 and b!=1:
		if a<b:
			print("Bob")
		else:
			print("Alice")
	elif a==1 and b!=1:
		print("Alice")
	else:
		print("Bob")

### FIXED CODE ###

a,b = map(int, raw_input().split())

if a==b:
	print "Draw"
else:
	if a!=1 and b!=1:
		if a<b:
			print "Bob"
		else:
			print "Alice"
	elif a==1 and b!=1:
		print "Alice"
	else:
		print "Bob"
S = str.input()
T = str.input()
U = len(S)
V = len(T)
X = T - S
if T.startwith(S) and X = 1:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

s = input()
t = input()
if s == t[:-1]:
  print('Yes')
else:
  print('No')
import sys


def main():
    n = input()
    n = int(n)
    l = {}
    lR = {}
    l = list(sys.stdin.readline().split())
    lR = l[::-1]
    givenLen = len(l)
    if l == lR:
        return 0

    temp = {}
    temp[0] = 0
    for i, e in enumerate(l):
        temp[i+1] = e
    l = dict(temp)
    temp = {}
    temp[0] = 0
    for i, e in enumerate(lR):
        temp[i+1] = e
    lR = dict(temp)

    LCStable = [[0 for _ in range(givenLen+1)]]*(givenLen+1)

    for i in l:
        for j in lR:
            if i==0 or j==0:
                LCStable[i][j]=0
            elif l[i]==lR[j]:
                LCStable[i][j]=LCStable[i-1][j-1]+1
            else:
                LCStable[i][j]=max(LCStable[i][j-1],LCStable[i-1][j])
    # print(LCStable)
    return givenLen-LCStable[-1][-1]


# if __name__ == '__main__':
#     print(main())

print(main())


### FIXED CODE ###

def main():
    l = input()
    givenLen = len(l)
    if l==l[::-1]:
        return 0

    count=0
    for i in range(len(l)//2):
        if l[i]!=l[len(l)-1-i]:
            count+=1
    return count

print(main())
n = int(input())
l= list(map(int,input().split()))
c = [0] * 10001
for i in l:
  c[i] += 1
n = int(input())
s = sum(c)
for i in range(n):
  be,af = map(int,input().split())
  s -= be * c[be]
  s += af * c[be]
  c[af] += c[be]
  c[be] = 0
  print(s)

### FIXED CODE ###

N = int(input())
A= list(map(int,input().split()))
Q = int(input())
heavy = [0] * (10 ** 5 + 1)
for i in A:
  heavy[i] += 1
s = sum(A)
for i in range(Q):
  be,af = map(int,input().split())
  s -= be * heavy[be]
  s += af * heavy[be]
  heavy[af] += heavy[be]
  heavy[be] = 0
  print(s)
class Node:
    nodes = {}
    @classmethod
    def get_root_node(cls):
        #n = Node.nodes[next(iter(Node.nodes))]
        n = Node.nodes[1]
        for _ in range(len(Node.nodes)):
            if n.parent is None:
                return n
            else:
                n = n.parent

    @classmethod
    def largest_num_color(cls):
        r = 0
        for key, node in Node.nodes.items():
            if node.num_color > r:
                r = node.num_color
        return r

    @classmethod
    def dump_all_nodes(cls):
        for key, node in Node.nodes.items():
            print(str(node))

    @classmethod
    def get_instance(cls, id, parent):
        if id in Node.nodes:
            if Node.nodes[id].parent is None:
                Node.nodes[id].parent = parent
            return Node.nodes[id]
        else:
            return Node(id, parent)

    @classmethod
    def color_childs(clf, start_node):
        c = 1
        list_to_visit = []
        list_to_visit += start_node.childs
        list_to_visit.append(-1)
        while(len(list_to_visit)>0):
            if list_to_visit[0]==-1:
                c = 1
                list_to_visit.remove(list_to_visit[0])
                continue
            node = list_to_visit[0]
            list_to_visit.remove(list_to_visit[0])
            if c == node.parent.parent_edge_color:
                c += 1
            node.parent_edge_color = c
            list_to_visit += node.childs
            list_to_visit.append(-1)
            c += 1

    def __init__(self, id, parent):
        self.id = id
        self.parent = parent # None if root Node
        self.parent_edge_color = None
        self.childs = []
        Node.nodes[id] = self
        self.used_color = []

    def __str__(self):
        x = self.parent.id if self.parent else "None"
        #return f"id: {self.id}, parent: {x}, parent_edge_color: {self.parent_edge_color} ,num_child {len(self.childs)}, num_color {self.num_color}"
        return str(self.id)

    def append_child(self, node):
        self.childs.append(node)

    @property
    def num_color(self):
        if self.parent_edge_color is None:
            return len(self.childs)
        else:
            return len(self.childs) + 1

N = int(input())

Edges = []
Edges_color = []
for i in range(N-1):
    edge = list(map(int, input().split()))
    Edges.append(edge)


for edge in Edges:
    pnode = Node.get_instance(edge[0], None)
    cnode = Node.get_instance(edge[1], pnode)
    pnode.append_child(cnode)

root = Node.get_root_node()

Node.color_childs(root)
#Node.dump_all_nodes()
K = Node.largest_num_color()
print(K)

for edge in Edges:
    print(Node.get_instance(edge[1], edge[0]).parent_edge_color)



### FIXED CODE ###

s = input()

if s=='MON':
    print(6)
elif s=='TUE':
    print(5)
elif s=='WED':
    print(4)
elif s=='THU':
    print(3)
elif s=='FRI':
    print(2)
elif s=='SAT':
    print(1)
elif s=='SUN':
    print(7)
n=int(input())
a=list(map(int,input().split()))
while len(a)>1:
  a.sort()
  for i in range(1,n):
    a[i]=a[i]%a[0]
  a.replace(0,'')
  n=len(a)
print(a[0])

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
while len(a)>1:
  a.sort()
  for i in range(1,n):
    a[i]=a[i]%a[0]
  a=[i for i in a if not i==0]
  n=len(a)
print(a[0])
odds, evens = input().split()
chars = []
for odd, even in zip(odds, evens):
    chars.append(odd)
    chars.append(even)
ans = "".join(chars)
print(ans)

### FIXED CODE ###

from itertools import zip_longest

odds, evens = [input() for _ in range(2)]
chars = []
for odd, even in zip_longest(odds, evens, fillvalue=""):
    chars.append(odd)
    chars.append(even)
ans = "".join(chars)
print(ans)
N = int(input())
A = list(map(int, input().split()))

# 各数字の個数を格納
dict = {}
for a in A:
    if a in dict:
        dict[a] += 1
    else:
        dict[a] = 1

# k番目の値を消さない場合の場合分けの個数
ans = 0
for d in dict.values():
    if d > 1:
        ans += (d * (d - 1)) // 2

# k番目の値を除いた場合に減る場合の数を引いて答えを出力
memo = {}
for k in range(N):
    w = dict[A[k]]
    # 減る数
    if w == 1:
        pass
    elif w == 2:
        decrease = -1
    elif w > 2:
        decrease = ((w - 1) * (w - 2) // 2) - (w * (w - 1) // 2 )
    print(ans + decrease)


### FIXED CODE ###

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

# 各数字の個数を格納
dict = {}
for a in A:
    if a in dict:
        dict[a] += 1
    else:
        dict[a] = 1

# k番目の値を消さない場合の場合分けの個数
ans = 0
for d in dict.values():
    if d > 1:
        ans += (d * (d - 1)) // 2

# k番目の値を除いた場合に減る場合の数を引いて答えを出力
for k in range(N):
    w = dict[A[k]]
    # 減る数
    decrease = 0
    if w == 1:
        pass
    elif w == 2:
        decrease = -1
    elif w > 2:
        decrease = ((w - 1) * (w - 2) // 2) - (w * (w - 1) // 2 )
    print(ans + decrease)
N = int(input())


def is_prime(n):
    for i in range(1, n):
        if i != 1 and n % i == 0:
            return False
    return True


def prime_numbers():
    num = 5
    while True:
        is_num_prime = is_prime(num)
        if is_num_prime and num % 5 == 1:
            yield num
        num += 1


prime_gene = prime_numbers()
ans = [next(prime_gene) for _ in range(N)]
print(*ans)


### FIXED CODE ###

a, b = map(int, input().split())
if a <= b:
    nums = a
else:
    nums = a - 1
print(nums)
# 371 ms, 27032 KB
n = int(input())
a = list(map(int, input().split()))
q = int(input())
b = []
c = []
 
bc = [map(int, input().split()) for _ in range(q)]
b, c = [list(i) for i in zip(*bc)]
 
dic = {}
for aa in a:
    dic[aa] = dic.get(aa, 0) + 1
 
s = sum(a)
for i in range(q):
    if b[i] not in dic:
        print (str(s))
        continue
    s += (c[i]-b[i]) * dic[b[i]]
    dic[c[i]] = dic.get(c[i], 0) + dic[b[i]]
    del dic[b[i]]
    print(s)

### FIXED CODE ###

s = input()
if s.isupper():
    print("A")
else:
    print("a")
N, M = map(int, input().split())
ab = [input().split() for a in range(M)]
cd = [input().split() for a in range(M)]


for y in range(M):
    min_p = 999
    point = 1
    for x in range(M):
        distance = abs(int(ab[y][0]) - int(cd[x][0])) + abs(int(ab[y][1]) - int(cd[x][1]))
        if min_p == distance:
            continue
        elif min_p > distance:
            min_p = distance
            point += 1
    print(point)

### FIXED CODE ###

if __name__ == '__main__':
    student_count, checkpoint_count = map(int, input().split())
    student_points = [list(map(int, input().split())) for i in range(1, student_count + 1)]
    check_points = [list(map(int, input().split())) for i in range(1, checkpoint_count + 1)]
 
    for student_point_x, student_point_y in student_points:
        point_number = 0
        shortest_distance = float('inf')
        manhattan_distance = 0
 
        for i in range(len(check_points)):
            diff_x = abs(student_point_x - check_points[i][0])
            diff_y = abs(student_point_y - check_points[i][1])
            manhattan_distance = diff_x + diff_y
 
            if manhattan_distance < shortest_distance:
                shortest_distance = manhattan_distance
                point_number = i + 1
 
        print(point_number)
line = input()
A,B = [int(u) for u in line.split()]
def func(a,b)
    return min(a+b,a-b,a*b)
print(func(A,B))

### FIXED CODE ###

num = input()
a = int(num.split(' ')[0])
b = int(num.split(' ')[1])


c = [a+b,a-b,a*b]

print(max(c))
N, M , X , Y = map(int, input().split())
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))
xs.append(X)
ys.append(Y)
if min(ys) <= max(xs) 
    print('War')
else:
    print('No War')

### FIXED CODE ###

N, M , X , Y = map(int, input().split())
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))
xs.append(X)
ys.append(Y)
if min(ys) <= max(xs):
    print('War')
else:
    print('No War')
h,w=map(int,input().split())
for i in range(h):
    s=input()
    print(s+'\n'+s)

### FIXED CODE ###

x=input()

c_s=0
c_t=0

for i in x:
  if i=='S':
    c_s+=1
  else:
    if c_s==0:
      c_t+=1
    else:
      c_s-=1

print(c_s+c_t)
l = input().split()
d = min(l)
e = max(l)
f = l.remove(max(l))


print(str(d) + " " + str(max(f)) + " " + str(e))

### FIXED CODE ###

l = list(map(int, input().split()))
l.sort()
for i in range(len(l)):
    if i == len(l)-1:
        print(l[i])
    else:
        print(l[i], end = " ")
s = input()
c = 0
first, second = s[:len(s)//2], s[(len(s)+1)//2:]
if f == reversed(second):
    print(c)
else:
    for x in range(len(first)):
        if first[x] != second[len(second)-x-1]:
            count += 1
    print(c)

### FIXED CODE ###

s = input()
c = 0
first, second = s[:len(s)//2], s[(len(s)+1)//2:]
if first == reversed(second):
    print(c)
else:
    for x in range(len(first)):
        if first[x] != second[len(second)-x-1]:
            c += 1
    print(c)
n,m=map(int,input().split())
l=[0]*n
for i in range(m):
  a,b=map(int,input().split())
  l[a-1]+=1
  l[b-1]+=1
b=True
for i in range(m):
  if l[i]%2!=1:
    b=False
if b:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n,m=map(int,input().split())
l=[0]*n
for i in range(m):
  a,b=map(int,input().split())
  l[a-1]+=1
  l[b-1]+=1
b=True
for i in range(n):
  if l[i]%2==1:
    b=False
if b:
  print("YES")
else:
  print("NO")
N = int(input())
s = [''.join(sorted(input())) for _ in range(N)]
s_dict = {}
sum = 0
for i in range(N):
    if s[i] in s_dict.keys():
        s_dict(s[i]) += 1
        sum += s_dict(s[i])
    else:
        s_dict(s[i]) = 1
print(sum)

### FIXED CODE ###

N = int(input())
s = [''.join(sorted(input())) for _ in range(N)]

s_dict ={}
ans = 0
for i in range(N) :
    if s[i] in s_dict.keys() :
        ans += s_dict[s[i]]
        s_dict[s[i]] += 1
    else :
        s_dict[s[i]] = 1
print(ans)
a,b = input()
a = int(a)
b.replace(".","")
b = int(b)
print(a*b//100)

### FIXED CODE ###

a,b = input().split()
a = int(a)
c = b.replace(".","")
c = int(c)
print(a*c//100)
n,m=list(map(int,input().split()))
t=np.zeros(m)
for i in range(n):
  tmp=list(map(int,input().split()))  
  for j in range(tmp[0]):
    t[tmp[j+1]-1] += 1
  
maxIndex = [i for i, x in enumerate(a) if x == max(tmp)]
print(len(maxIndex)

### FIXED CODE ###

import numpy as np

n,m=list(map(int,input().split()))
t=np.zeros(m)
for i in range(n):
  tmp=list(map(int,input().split()))  
  for j in range(tmp[0]):
    t[tmp[j+1]-1] += 1
  
maxIndex = [i for i, x in enumerate(t) if x == n]
print(len(maxIndex))