Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

s=list(map(int,input()))
count=0
k=len(s)-2
i=0
while i<=k:
    if s[i]!=s[i+1]:
        s.remove(s[i])
        s.remove(s[i])
        k-=2
        count+=2
        if i!=0:
            i-=1
    else:
        i+=1
    
print(count) 


### FIXED CODE ###

n=input()
a=n.count('1')
b=n.count('0')
if a<b:
    print(2*a)
else:
    print(2*b)
### BUGGY CODE ###

def inp():exec('global inppp\ninpmoto,inppp=input().split(),[]\nfor i in inpmoto:\n try:inppp.append(int(i))if float(i).is_integer()else inppp.append(float(i));\n except:\n  try:inppp.append(str(i))\n  except:print("error in inp")');return inppp[0]if len(inppp)==1else list(inppp)
a, b = inp()
c = inp()
if type(c) == int:
    c = [c]
d = []
for i in c:
    d.append(i-1)
itta = []
mati = 0
i = 0
while True:
    if mati in itta:
        saisyo = mati
        break
    else:
        itta.append(mati)
        mati = d[mati]
        i += 1
risuto = []
while True:
    if mati in risuto:
        break
    else:
        risuto.append(mati)
        mati = d[mati]
if b <= i-1:
    print(itta[b]+1)
else:
    print(risuto[(b-i)%len(risuto)]+1)

### FIXED CODE ###

a, b = list(map(int, input().split()))
c = list(map(int, input().split()))
itta2 = set([])
mati = 1
i = 0
itta = []
while True:
    if mati in itta2:
        saisyo = mati
        break
    else:
        itta2.add(mati)
        itta.append(mati)
        mati = c[mati-1]
        i += 1
risuto2 = set([])
risuto = []

while True:
    if mati in risuto2:
        break
    else:
        risuto2.add(mati)
        risuto.append(mati)
        mati = c[mati-1]
if b <= i-1:
    print(itta[b])
else:
    print(risuto[(b-i) % len(risuto)])
### BUGGY CODE ###

from collections import Counter
N, P = map(int, input().split())
S = input()[::-1]
ans = 0
m = [0]*(N+1)
if 10 % P == 0:
    for i in range(N):
        if int(S[i]) % P == 0:
            ans += N-i
else:
    v = 0
    for i in range(N):
        v += int(S[i])*pow(10, i)
        m[i+1] = v % P
    c = Counter(m)
    for d in c.values():
        if d >= 2:
            ans += d*(d-1)//2
print(ans)

### FIXED CODE ###

n, p = map(int,input().split())
D = input()
out = 0


if 10 % p == 0:
    for i in range(n):
        if int(D[i]) % p == 0:
            out += i + 1
else:
    mod = 0
    count = [0] * p
    ten = 1
    count[mod] += 1
    for i in range(n):
        mod = (mod + int(D[n-i-1]) * ten) % p
        ten = ten * 10 % p
        count[mod] += 1
    for c in count:
        out += (c * (c - 1)) // 2
print(out)
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
q=int(input())
bc=[list(map(int,input().split())) for i in range(q)]

for i in range(q):
  sum = 0
  for j in range(n):
    if bc[i][0] == a[j]:
      sum += bc[i][1]
      a[j] = bc[i][1]
    else:
      sum += a[j]
  print(sum)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
q=int(input())
bc=[list(map(int,input().split())) for i in range(q)]

A=[0]*(10**5+1)
for i in range(n):
  A[a[i]] += 1

sum_tmp = sum(a)
for i in range(q):
  b = bc[i][0]
  c = bc[i][1]
  A[c] += A[b]
  sum_tmp += (c-b) * A[b]
  A[b] = 0
  
  print(sum_tmp)
### BUGGY CODE ###

N, M, Q = [int(_) for _ in input().split()]
train = [[int(_) for _ in input().split()] for i in range(M)]
question = [[int(_) for _ in input().split()] for i in range(Q)]

nl = [[0 for i in range(N)] for j in range(N)]
for t in train:
    i = t[0] - 1
    j = t[1] - 1
    nl[i][j] += 1

l = [[0 for i in range(N)] for j in range(N)]
for i in range(N):
    s = 0
    for j in range(N):
        l[i][j] = s + nl[i][j]
        s = l[i][j]

for k in range(Q):
    p = question[k][0]
    q = question[k][1]
    ans = 0
    for i in range(p-1, q):
        if p == 1:
            d = l[i][q-1]
        else:
            d = l[i][q-1] - l[i][p-2]
        ans += d
    print(ans)


### FIXED CODE ###

N, M, Q = [int(_) for _ in input().split()]

l = [[0 for i in range(N+1)] for j in range(N+2)]
for t in [input().split() for _ in range(M)]:
    i = int(t[0])
    j = int(t[1])
    l[i][j] += 1

for k in range(N):
    for i in range(1, N-k+1):
        j = i + k
        l[i][j] += l[i][j-1] + l[i+1][j] - l[i+1][j-1]

for k in [input().split() for _ in range(Q)]:
    p = int(k[0])
    q = int(k[1])
    print(l[p][q])
### BUGGY CODE ###

# coding: utf-8
import sys
from bisect import bisect_left, bisect_right, insort
sys.setrecursionlimit(10 ** 7)

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = [0] + lr()  # 1-indexed
graph = [[] for _ in range(N+1)]  # 1-indexed
for _ in range(N-1):
    a, b = lr()
    graph[a].append(b)
    graph[b].append(a)

answer = [0] * (N+1)  # 1-indexed
INF = 10 ** 10
parent = [-1] * (N+1)

def dfs(n, arr):
    """arrはLISのリスト、answerのリストを更新してから子にarrを渡す"""
    i = bisect_left(arr, INF)
    answer[n] = i
    for c in graph[n]:
        if c == parent[n]:
            continue
        parent[c] = n
        new = arr[:]
        i = bisect_left(new, A[c])
        new[i] = A[c]
        dfs(c, new)

B = [INF] * (N+1)
B[0] = A[1]
dfs(1, B)
for a in answer[1:]:
    print(a)


### FIXED CODE ###

# coding: utf-8
import sys
from bisect import bisect_left, bisect_right, insort
sys.setrecursionlimit(10 ** 7)

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = [0] + lr()  # 1-indexed
graph = [[] for _ in range(N+1)]  # 1-indexed
for _ in range(N-1):
    a, b = lr()
    graph[a].append(b)
    graph[b].append(a)

answer = [0] * (N+1)  # 1-indexed
INF = 10 ** 10
parent = [-1] * (N+1)

def dfs(n):
    """arrはLISのリスト、answerのリストを更新してから子にarrを渡す"""
    i = bisect_left(dp, INF)
    answer[n] = i
    for c in graph[n]:
        if c == parent[n]:
            continue
        parent[c] = n
        i = bisect_left(dp, A[c])
        old = dp[i]
        dp[i] = A[c]
        dfs(c)
        dp[i] = old

dp = [INF] * (N+1)
dp[0] = A[1]
dfs(1)
for a in answer[1:]:
    print(a)
### BUGGY CODE ###

N = int(input())
L = list(map(int,input().split()))
Ans = 1
# print(len(L))
for i in L:
    Ans = Ans * i
if (10**18 - Ans) < 0:
     print(-1)
else:
    print(Ans)



### FIXED CODE ###

N = int(input())
L = list(map(int,input().split()))
dec = 10**18
Ans = 1
# print(len(L))
if(0 in L):
    print(0)
else:
    for i in L:
        Ans = Ans * i
        if dec < Ans:
            print(-1)
            break
    else:
        print(Ans)
### BUGGY CODE ###

import itertools
import numpy as np

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

a=[]
b=[]
c=[]
d=[]

for i in range(q):
    ai, bi, ci, di = list(map(int, input().split()))
    a.append(ai)
    b.append(bi)
    c.append(ci)
    d.append(di)

h = []
A_list = np.array(list(itertools.combinations_with_replacement(range(1, m+1), n)))


for A in A_list:
    s = 0
    for i in range(q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            s += d[i]
    h.append(s)

print(max(h))
 



### FIXED CODE ###

import itertools

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

a=[]
b=[]
c=[]
d=[]

for i in range(q):
    x = list(map(int, input().split()))
    a.append(x[0])
    b.append(x[1])
    c.append(x[2])
    d.append(x[3])

h = []
A_list = list(itertools.combinations_with_replacement(range(1, m+1), n))


for A in A_list:
    s = 0
    for i in range(q):
        if A[b[i]-1] - A[a[i]-1] == c[i]:
            s += d[i]
    h.append(s)

print(max(h))
### BUGGY CODE ###

n = int(input())
s_list = []
n_list = []
ana = 0
for i in range(n):
    s = sorted(input())
    #print(s)
    if len(s_list) > 0:
        for num, s_i in enumerate(s_list):
            is_exist = False
            if s_i == s:
                n_list[num] += 1
                ana += n_list[num]
                is_exist = True
                break
        if not is_exist:
            s_list.append(s)
            n_list.append(0)
    else:
        s_list.append(s)
        n_list.append(0)

print(int(ana))

### FIXED CODE ###

n = int(input())
s_dict = {}
ana = 0
for i in range(n):
    s = "".join(sorted(input()))
    #print(s)
    if s in s_dict:
        ana += s_dict[s]
        s_dict[s] += 1
    else:
        s_dict[s] = 1
        
print(ana)
### BUGGY CODE ###

import queue

class Queue:
    def __init__(self,data = []):
        self.data = data
    def enqueue(self,x):
        self.data.append(x)
        return self.data
    def dequeue(self):
        if len(self.data) <= 0:
            print('Queue is Empty')
            return -1
        else:
            out = self.data[0]
            del self.data[0]
            return out
    def show(self):
        print(self.data)

    def list(self):
        return self.data


k = int(input())

# FIFOキューの作成
#q = queue.Queue()
q = Queue()

for i in range(1,10):
    q.enqueue(i)

#q.show()

for i in range(k):
    x = q.dequeue()

    if not x % 10 == 0:
        q.enqueue(10 * x + x % 10- 1)

    q.enqueue(10 * x + x % 10)

    if not x % 10 == 9:
        q.enqueue(10 * x + x % 10 + 1)
    
print(x)
    #print(i+1,x,q.list())
    #q.show()

### FIXED CODE ###

import queue

k = int(input())

q = queue.Queue()
for i in range(1,10):
    q.put(i)

for i in range(k):
    x = q.get()

    p = 10 * x  
    m = x % 10
    if not m == 0:
        q.put(p + m - 1)

    q.put(p + m)

    if not m == 9:
        q.put(p + m + 1)
    
print(x)
### BUGGY CODE ###

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

B = []
for i in range(N):
    B.append(A[i])
    B = B[::-1]

print(*B)


### FIXED CODE ###

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

if len(A) == 1:
    print(A[0])
    exit(0)

B_left = []
B_right = []
for i, a in enumerate(A):
    if i % 2 == 0:
        B_right.append(a)
    else:
        B_left.append(a)

if len(A) % 2 == 0:
    B = B_left[::-1] + B_right
else:
    B = B_right[::-1] + B_left
print(*B)
### BUGGY CODE ###

N=int(input())
Ins=[]
ans=0
for i in range(N):
    S=input()
    if not S in Ins:
        ans+=1
        Ins.append(S)
print(ans)


### FIXED CODE ###

import collections
N=int(input())
S=[]
for i in range(N):
    S.append(input())
s=collections.Counter(S)
s_key=s.keys()
print(len(s_key))
### BUGGY CODE ###

n, m = map(int, input().split())
init_set = None

for i in range(m):
  l,m = map(int, input().split())
  tmp_set = set([i for i in range(l,m+1)])
  if init_set is None:
    init_set = tmp_set
  else:
    init_set = init_set.intersection(tmp_set)
print(min(n,len(init_set)))

### FIXED CODE ###

n,m = map(int,input().split())
a_min = 1
a_max = n
for _ in range(m):
  l,r = map(int,input().split())
  a_min = max(a_min,l)
  a_max = min(a_max,r)
if a_min>a_max:
  print(0)
else:
  print(a_max-a_min+1)
### BUGGY CODE ###

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,k = inpl()
now = inpl()
now.append(0)
for _ in range(k):
    pre = now[::]
    now = [0] * (n+1)
    for j in range(n):
        a = max(0,j-pre[j])
        b = min(n,j+pre[j]+1)
        now[a] += 1
        now[b] -= 1
    x = 0
    for j in range(n):
        x += now[j]
        now[j] = x
    if min(now) == n:
        break
print(*now[:n])


### FIXED CODE ###

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,k = inpl()
now = inpl()
now.append(0)
for _ in range(k):
    pre = now[::]
    now = [0] * (n+1)
    for j in range(n):
        a = max(0,j-pre[j])
        b = min(n,j+pre[j]+1)
        now[a] += 1
        now[b] -= 1
    x = 0
    mi = INF
    for j in range(n):
        x += now[j]
        mi = min(mi,x)
        now[j] = x
    if mi == n:
        break
print(*now[:n])
### BUGGY CODE ###

N, b, r = map(int, input().split())
ans = N // (b + r) * b
N = N % (b + r)
for i in range(N):
    if b:
        ans += 1
        b -= 1
    else:
        break
print(ans)

### FIXED CODE ###

N, b, r = map(int, input().split())
ans = N // (b + r) * b
N = N % (b + r)
if b > N:
    ans += N
else:
    ans += b
print(ans)
### BUGGY CODE ###

import sys,collections

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

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

def main():
  h,w=LI()
  field=[S() for _ in range(h)]

  ans=0
  visited=[[-1 for __ in range(w)] for _ in range(h)]
  q=collections.deque()
  for i in range(h):
    for j in range(w):
      if field[i][j]=='#':
        continue
      q.append((i,j,0))
      for _i in range(h):
        for _j in range(w):
          visited[_i][_j]=-1
      while q:
        y,x,c=q.popleft()
        visited[y][x]=c

        for dy,dx in ((-1,0),(0,1),(1,0),(0,-1)):
          ny=y+dy
          nx=x+dx
          if not 0<=ny<h:
            continue
          if not 0<=nx<w:
            continue
          if field[ny][nx]=='#':
            continue
          if visited[ny][nx]!=-1:
            continue
          q.append((ny,nx,c+1))
      ans=max(ans,c)
  return ans

# main()
print(main())


### FIXED CODE ###

import sys,collections

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

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

def main():
  h,w=LI()
  field=[S() for _ in range(h)]

  ans=0
  visited=[[-1 for __ in range(w)] for _ in range(h)]
  q=collections.deque()
  for i in range(h):
    for j in range(w):
      if field[i][j]=='#':
        continue
      q.append((i,j))
      for _i in range(h):
        for _j in range(w):
          visited[_i][_j]=-1
      visited[i][j]=0
      _ans=0
      while q:
        y,x=q.popleft()

        for dy,dx in ((-1,0),(0,1),(1,0),(0,-1)):
          ny=y+dy
          nx=x+dx
          if not 0<=ny<h:
            continue
          if not 0<=nx<w:
            continue
          if field[ny][nx]=='#':
            continue
          if visited[ny][nx]!=-1:
            continue
          _ans=visited[y][x]+1
          visited[ny][nx]=_ans
          q.append((ny,nx))
      ans=max(ans,_ans)
  return ans

# main()
print(main())
### BUGGY CODE ###

import math
import collections
def main():

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


    def prime_factor(n):
        ans = []
        if n % 2 == 0: ans.append(2)
        while n % 2 == 0:
            n //= 2

        for i in range(3, int(math.sqrt(n))+1, 2):
            if n % i == 0:
                ans.append(i)
            while n % i == 0:
                n //= i
        if n > 1:
            ans.append(n)
        return ans

    ispair = True
    isset = True

    d = dict()
    for v in A:
        for u in prime_factor(v):
            d[u] = d.get(u, 0) + 1
    # print(d)

    if any(d[p] > 1 for p in d):
        ispair = False
    if any(d[p] == N for p in d):
        isset = False

    if ispair:
        return "pairwise coprime"
    if isset:
        return "setwise coprime"

    return "not coprime"

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

### FIXED CODE ###

import math
import collections
def main():

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

    def prime_factorize(n):
        a = []
        while n % 2 == 0:
            a.append(2)
            n //= 2
        f = 3
        while f * f <= n:
            if n % f == 0:
                a.append(f)
                n //= f
            else:
                f += 2
        if n != 1:
            a.append(n)
        return a

    ispair = True
    isset = True

    d = dict()
    for v in A:
        for u in set(prime_factorize(v)):
            d[u] = d.get(u, 0) + 1
    # print(d)

    if any(d[p] > 1 for p in d):
        ispair = False
    if any(d[p] == N for p in d):
        isset = False

    if ispair:
        return "pairwise coprime"
    if isset:
        return "setwise coprime"

    return "not coprime"

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

n = int(input())
S = input()

R = {}
G = {}
B = {}

for i in range(n):
    if S[i] == 'R':
        R[i] = None
    elif S[i] == 'G':
        G[i] = None
    else:
        B[i] = None

#print(R, G, B)

cnt = 0

for r in R:
    for g in G:
        for b in B:
            if (r * 2 == g + b) or (g * 2 == r + b) or (b * 2 == r + g):
                continue
            cnt += 1
            
print(cnt)

### FIXED CODE ###

n = int(input())
S = input()

R = {}
G = {}
B = {}

for i in range(n):
    if S[i] == 'R':
        R[i] = None
    elif S[i] == 'G':
        G[i] = None
    else:
        B[i] = None

#print(R, G, B)

cnt = 0

cnt = len(R) * len(G) * len(B)

for b in B:
    for g in G:
        if (b + g) / 2 in R:
            cnt -= 1

for r in R:
    for b in B:
        if (r + b) / 2 in G:
            cnt -= 1

for r in R:
    for g in G:
        if (r + g) / 2 in B:
            cnt -= 1
            
print(cnt)
### BUGGY CODE ###

# ABC 122, c
n, q = [int(el) for el in input().split(' ')]
s = input()
LR = [[int(el) for el in input().split(' ')] for i in range(q)]

for l, r in LR:
    sub_s = s[(l-1):r]
    print(sub_s.count('AC'))


### FIXED CODE ###

# ABC 122, c
n, q = [int(el) for el in input().split(' ')]
s = input()
T = [0] * (n + 1)
for i in range(n):
    T[i+1] = T[i] + (1 if s[i:i+2] == 'AC' else 0)


for i in range(q):
    l, r = [int(el) for el in input().split(' ')]
    print(T[r-1] - T[l-1])
### BUGGY CODE ###

import sys


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

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

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


N, M = map(int, input().split())
uf = UnionFind(N)

for i in range(M):
    A, B = map(int, input().split())
    uf.union(A-1,B-1)

hoge = list(uf.all_group_members().values())
Max = 0
for i in range(len(hoge)):
    Max = max(Max,len(hoge[i]))

print(Max)

### FIXED CODE ###

import sys
from collections import defaultdict
import collections

sys.setrecursionlimit(1000000)

class UnionFindPathCompression():
    def __init__(self, n):
        self.parents = list(range(n))

    def find(self, x):
        if self.parents[x] == x:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        self.parents[y] = x


N, M = map(int, input().split())
uf = UnionFindPathCompression(N)

for i in range(M):
    A, B = map(int, input().split())
    uf.union(A - 1, B - 1)

hoge = [uf.find(i) for i in range(N)]

#print(hoge)
hogehoge = collections.Counter(hoge).most_common()

print(hogehoge[0][1])
### BUGGY CODE ###

def main():
    ini_inp=list(map(lambda x:int(x),input().split()))
    N=ini_inp[0]
    M=ini_inp[1]

    L=[]
    R=[]
    for i in range(M):
        sec_inp=list(map(lambda x:int(x),input().split()))
        L.append(sec_inp[0])
        R.append(sec_inp[1])

    temp=[]
    for i in range(M):
        if i==0:
           temp=set([i for i in range(L[i],R[i]+1)])
        number=set([i for i in range(L[i],R[i]+1)])
        temp=number & temp
        if len(temp)==0:
            break
    print(len(temp))

if __name__=="__main__":
    main()
        


### FIXED CODE ###

def main():
    ini_inp=list(map(lambda x:int(x),input().split()))
    N=ini_inp[0]
    M=ini_inp[1]

    L=[]
    R=[]
    for i in range(M):
        sec_inp=list(map(lambda x:int(x),input().split()))
        L.append(sec_inp[0])
        R.append(sec_inp[1])

    low=L[0]
    up=R[0]
    flag=0
    for i in range(1,M):
        if L[i]>up:
            flag=1
            break
        elif L[i]>=low:
            low=L[i]
        elif R[i]<=up:
            up=R[i]

    if flag==0:
        print(up-low+1)
    else:
        print(0)

if __name__=="__main__":
    main()
### BUGGY CODE ###

a, b = map(int, input().split()) 
 
count = 1
an = []
bn = []
eee = min(a,b)
 
for ii in range(1, eee+2):
    bbb = b * ii
    bn.append(bbb)
 
while True:
    aaa = a * count
    
    if aaa in bn:
        print(aaa)
        break
    count += 1

### FIXED CODE ###

a, b = map(int, input().split()) 
count = 1
 
while True:
    aaa = a * count
    if aaa % b == 0:
        print(aaa)
        break

    count += 1
### BUGGY CODE ###

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

for i in range(1, n+1):
    print(a.count(i))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = [0] * n

for i in a:
    ans[i-1] += 1
for i in ans:
    print(i)
### BUGGY CODE ###

import math

N, M = map(int, input().split())
max = int(math.sqrt(M))
mod = 7 + 10**9
F = []

def Prime(i): #素数であればTrueを返す
    root = math.sqrt(i)
    j, div = 2, False
    while j <= root:
        if i % j == 0:
            div = True
            break
        j += 1
    return (True if not div else False)

def comb(n, r):
    ans = math.factorial(n) // (math.factorial(n-r) * math.factorial(r))
    return ans % mod


ans = 1
for i in range(2, max + 1):
    if M % i == 0:
        div = M // i
        if Prime(i):
            pow = 0
            while M % (i ** (pow+1)) == 0:
                pow += 1
            ans *= comb(pow + N -1, pow)
            ans %= mod
        if Prime(div):
            pow = 0
            while M % (i ** (pow+1)) == 0:
                pow += 1
            ans *= comb(pow + N - 1, pow)
            ans %= mod

print(ans)

### FIXED CODE ###

import math

def InvMod(i, pow, mod): #階乗のmodを計算
    if pow == 1:
        return i % mod
    else:
        if pow % 2 == 0:
            return InvMod((i**2) % mod, pow//2, mod) % mod
        else:
            return InvMod((i**2) % mod, pow//2, mod) * i % mod

def Prime(i): #素数であればTrueを返す
    root = math.sqrt(i)
    j, div = 2, True
    while j <= root:
        if i % j == 0:
            div = False
            break
        j += 1
    return div

N, M = map(int, input().split())
max = int(math.sqrt(M))
mod = 7 + 10**9

Pinv = [0]
Pfact = 1
for i in range(1, 31): #(階乗)^-1の計算, 2^31 > 10^9なので階乗は高々30乗まで
    Pfact *= i
    Pfact %= mod
    Pinv.append(InvMod(Pfact, mod-2, mod))

P = []
for i in range(2, max+1): #素因数の列挙
    if M % i == 0:
        if Prime(i):
            P.append(i)
        if Prime(M//i) and i**2 != M:
            P.append(M//i)

ans = 1
for p in P:
    C, pow = M, 0
    while C % p == 0: 
        pow += 1
        C //= p
    comb = Pinv[pow]  #(N-1)!/pow!(N-1)!
    for i in range(pow): #comb * (N-1+1)(N-1+2)…(N-1+pow)
        comb *= (N+i)
        comb %= mod
    ans *= comb
    ans %= mod

print(ans)