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

N, K = map(int, input().split())
P = list(map(int, input().split()))
 
m = [sum(P[i:i+K]) for i in range(N-K+1)]
m_index = m.index(max(m))

print(sum(map(lambda x: (x+1)/2, P[m_index:m_index+K])))

### FIXED CODE ###

from itertools import accumulate


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


expected = [(a+1)/2 for a in A]
accum_expected = list(accumulate(expected))
accum_expected.insert(0, 0)

ans = 0
for i in range(K, N+1):
    ans = max(ans, accum_expected[i]-accum_expected[i-K])
print(ans)
### BUGGY CODE ###

from itertools import product

N, A = map(int, input().split())
x = [int(xi) for xi in input().split()]
x_max = max(max(x), A)

dp = [[[0 for _ in range((N + 1) * x_max)]
      for _ in range(N + 1)]
      for _ in range(N + 1)]

dp[0][0][0] = 1

for j, k, s in product(range(1, N + 1),
                       range(N + 1),
                       range((N + 1) * x_max)):
    if s < x[j - 1]:
        dp[j][k][s] = dp[j - 1][k][s]
    elif k >= 1 and s >= x[j - 1]:
        dp[j][k][s] = dp[j - 1][k][s] + dp[j - 1][k - 1][s - x[j - 1]]

answer = sum([dp[N][k][k*A] for k in range(1, N + 1)])
print(answer)


### FIXED CODE ###

from itertools import product

N, A = map(int, input().split())
x = [int(xi) for xi in input().split()]
y = [xi - A for xi in x]
X = max(max(x), A)

dp = [[0 for _ in range(2 * N * X + 1)] for _ in range(N + 1)]

dp[0][N * X] = 1
for k, t in product(range(1, N + 1), range(2 * N * X + 1)):
    if k > 0 and (t - y[k - 1] < 0 or t - y[k - 1] > 2 * N * X):
        dp[k][t] = dp[k - 1][t]
    elif k > 0 and t - y[k - 1] <= 2 * N * X:
        dp[k][t] = dp[k - 1][t] + dp[k - 1][t - y[k - 1]]

print(dp[N][N * X] - 1)
### BUGGY CODE ###

n = int(input())

ai = list(map(int, input().split()))

ans = 1

for a in ai:
    ans *= a

if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)
    

### FIXED CODE ###

n = int(input())

ai = list(map(int, input().split()))

ans = 1

if 0 in ai:
    print(0)
else:
    for a in ai:
        ans *= a
        if ans > 1000000000000000000:
            ans = -1
            break
    print(ans)
### BUGGY CODE ###

n, m = map(int, input().split())
a = list(map(lambda x: x % m, map(int, input().split())))

s = 0
l = []
for i in range(n):
  if a[i] == 0:
    s += 1
  l.append(a[i])
  
for i in range(n):
  for j in range(i+1, n):
    l[i] = (l[i] + l[j]) % m
    if l[i] == 0:
      s += 1

print(s)

### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(lambda x: x % m, map(int, input().split())))

b = [0]
s = 0
for i in range(n):
  s = (s + a[i]) % m
  b.append(s)

mods = {}

ans = 0
for i in range(n+1):
  if b[i] in mods.keys():
    ans += mods[b[i]]
    mods[b[i]] += 1
  else:
    mods[b[i]] = 1
  
print(ans)
### BUGGY CODE ###

N = int(input())
ans = 0
for i in range(1,N+1):
    for j in range(1,i+1):
        ans += i if i%j == 0 else 0
print(ans)

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1,N+1):
    ans += N//i * (N//i + 1) // 2 * i
print(ans)
### BUGGY CODE ###

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

m = [10**6]
for j in range(1, n):
    m.append(min(p[:j]))

ans = 1
for i in range(1, n):
    if m[i] >= p[i]:
        ans += 1
        
print(ans)

### FIXED CODE ###

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

m = []
a = p[0]
for j in range(n):
    if a >= p[j]:
        a = p[j]
        m.append(a)
    else:
        m.append(a)

ans = 1
for i in range(n-1):
    if m[i] > m[i+1]:
        ans += 1
        
print(ans)
### BUGGY CODE ###

k = [int(x) for x in input().split()][1]
num_list = [int(x) for x in input().split()]
num_dict = {}
for num in num_list:
    num_dict[num] = num_dict.get(num, 0) + 1
for i in range(0, k):
    if num_dict:
        num_dict.pop(max(num_dict, key=num_dict.get))
    else:
        print(0)
        break
else:
    print(sum(num_dict.values()))


### FIXED CODE ###

[n, k] = [int(x) for x in input().split()]
num_list = [int(x) for x in input().split()]
num_dict = {}
for num in num_list:
    num_dict[num] = num_dict.get(num, 0) + 1
sorted_count = sorted(num_dict.values())
if len(sorted_count) - k > 0:
    print(sum(sorted_count[:len(sorted_count)-k]))
else:
    print(0)
### BUGGY CODE ###

n,a,*x=map(int,open(0).read().split())
x=[0]+x
dp=[[[0]*(50*n+1)for j in range(n+1)]for i in range(n+1)]
dp[0][0][0]=1
for i in range(1,n+1):
  dp[i][0]=dp[i-1][0]
  for j in range(1,n+1):
    for k in range(1,50*n+1):
      dp[i][j][k]=dp[i-1][j][k]
      if k-x[i]>=0:
        dp[i][j][k]+=dp[i-1][j-1][k-x[i]]
ans=0
for i in range(1,n+1):
  j=i*a
  if j<50*n+2:
    ans+=dp[-1][i][j]
print(ans)

### FIXED CODE ###

n,a,*x=map(int,open(0).read().split())
x=[0]+x
dp=[[[0]*(50*n+1)for j in range(n+1)]for i in range(n+1)]
dp[0][0][0]=1
for i in range(1,n+1):
  dp[i][0]=dp[i-1][0]
  for j in range(1,n+1):
    for k in range(1,50*n+1):
      dp[i][j][k]=dp[i-1][j][k]
      if k-x[i]>=0:
        dp[i][j][k]+=dp[i-1][j-1][k-x[i]]
ans=0
for i in range(1,n+1):
  j=i*a
  if j<50*n+2:
    ans+=dp[-1][i][j]
print(ans)
### BUGGY CODE ###

from operator import mul
from functools import reduce
n = int(input())
a = list(map(int,input().split()))
M = 10**18
ans = reduce(mul, a)
if ans > M:
	print(-1)
else:
	print(ans)


### FIXED CODE ###

n = int(input())
s = sorted(map(int,input().split()))
M = 10 ** 18
ans = 1
for ss in s:
	ans *= ss
	if ans > M:
		ans = -1
		break
	elif ans == 0:
		break
print(ans)
### BUGGY CODE ###

K, N = map(int, input().split())
A = map(int, input().split())
dist = 0
for a in A:
    dist |= 1 << a
dist = format(dist, "0%db" % K)
d = dist.index("1")
ans = 0
count = 0
for i in range(K):
    if dist[(d + i) % K] == "1":
        ans = max(ans, count)
        count = 0
    else:
        count += 1
ans = max(ans, count)
print(K - ans - 1)

### FIXED CODE ###

K, N = map(int, input().split())
A = map(int, input().split())
dist = [0] * K
for a in A:
    dist[a] = 1
d = dist.index(1)
ans = 0
count = 0
for i in range(K):
    if dist[(d + i) % K] == 1:
        ans = max(ans, count)
        count = 0
    else:
        count += 1
ans = max(ans, count)
print(K - ans - 1)
### BUGGY CODE ###

import math
A, B, N = map(int, input().split())

l = []
if N < B:
    for x in range(N+1):
        l.append(math.floor(A*x/B) - A*math.floor(x/B))
else:
    for x in range(B):
        l.append(math.floor(A*x/B) - A*math.floor(x/B))

print(max(l))
# print(l)


### FIXED CODE ###

import math
A, B, N = map(int, input().split())

x = min(B-1, N)
print(math.floor(A*x/B) - A*math.floor(x/B))
### BUGGY CODE ###

S = input()
InitL = len(S)
while S.count("01")+S.count("10")>0:
    S = S.replace("01", "")
    S = S.replace("10", "")
print(InitL - len(S))

### FIXED CODE ###

S = input()
ans = 2*min(S.count("0"), S.count("1"))
print(ans)
### BUGGY CODE ###

n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  i, a[i] = a[i], i

### FIXED CODE ###

n = int(input())
a = [0] + [int(input()) for _ in range(n)]
i = 1
c = 0
while True:
  if i == 2:
    print(c)
    quit(0)
  if a[i] == i:
    print(-1)
    quit(0)
  c += 1
  tmp = a[i]
  a[i] = i
  i = tmp
### BUGGY CODE ###

n=int(input())
s=str(input())
ans=0
for i in range(0,1000):
  temp=[]
  temp.append(i//100)
  temp.append((i-(i//100)*100)//10)
  temp.append(i%10)
  cnt=0
  k=0
  for j in range(0,n):
    if cnt==0 and temp[0]==int(s[j]):
      cnt=cnt+1
      k=j
      break
  if cnt==1:
    for j in range(k+1,n):      
      if temp[1]==int(s[j]):
        cnt=cnt+1
        k=j
        break
  if cnt==2:
    for j in range(k+1,n):
      if temp[2]==int(s[j]):
        ans=ans+1
        break
print(ans)

### FIXED CODE ###

n=int(input())
s=str(input())
ans=0
i=0
while i<1000:
  temp=i//100
  cnt=0
  k=0
  for j in range(0,n):
    if temp==int(s[j]):
      cnt=cnt+1
      k=j
      break
  if cnt==0:
    i=i+100
  else:
    temp=(i-(i//100)*100)//10
    for j in range(k+1,n):      
      if temp==int(s[j]):
        cnt=cnt+1
        k=j
        break
    if cnt==1:
      i=i+10
    else:
      temp=i%10
      i=i+1
      for j in range(k+1,n):
        if temp==int(s[j]):
          ans=ans+1
          break
print(ans)
### BUGGY CODE ###

from collections import deque
H,W,K,*L = open(0).read().split()
H,W,K = map(int, (H,W,K))
q = deque([])
step = [(-1,0),(1,0),(0,-1),(0,1)]
for i in range(H):
  flag = False
  for j in range(W):
    if L[i][j]=='S':
      q.append((i,j,0))
      flag = True
      break
  if flag:
    break
dist = [[-1]*W for i in range(H)]
dist[i][j] = 0
while q:
  a,b,c = q.popleft()
  dist[a][b] = c
  if c+1>K:
    continue
  for dx,dy in step:
    n = a+dx
    m = b+dy
    if not(-1<n<H and -1<m<W):
      continue
    if L[n][m]=='.':
      q.append((n,m,c+1))
      
ans = 10**10
for i in range(H):
  for j in range(W):
    if dist[i][j]==-1:
      continue
    x = min(i,H-i-1,j,W-j-1)
    cnt = 1+(x+K-1)//K
    ans = min(cnt,ans)
print(ans)


### FIXED CODE ###

from collections import deque
H,W,K,*L = open(0).read().split()
L = [list(a) for a in L]
H,W,K = map(int, (H,W,K))
q = deque([])
step = [(-1,0),(1,0),(0,-1),(0,1)]
for i,a in enumerate(L):
  if 'S' in a:
    q = deque([(0,i,a.index('S'))])
    break
ans = 10**10
while q:
  c,a,b = q.popleft()
  x = min(a,H-a-1,b,W-b-1)
  cnt = 1+(x+K-1)//K
  ans = min(cnt,ans)
  if c+1>K:
    continue
  for dx,dy in step:
    n = a+dx
    m = b+dy
    if not(-1<n<H and -1<m<W):
      continue
    if L[n][m]=='.':
      L[n][m]='#'
      q.append((c+1,n,m))
print(ans)
### BUGGY CODE ###

import math
abn = list(map(int,input().split()))

temp = 0

for x in range(abn[2] + 1):
    m = math.floor(abn[0] * x / abn[1]) - abn[0] * math.floor(x / abn[1])

    if m > temp:
        temp = m

print(temp)


### FIXED CODE ###

import math
abn = list(map(int,input().split()))

x = min(abn[1] - 1, abn[2])
m = math.floor(abn[0] * x / abn[1]) - abn[0] * math.floor(x / abn[1])
print(m)
### BUGGY CODE ###

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

result = 0
ai = [0]*n
aj = [0]*n

for i in range(n):
    ai[i] = a[i]+i+1
    aj[i] = i+1-a[i]
    
for i in range(n-1):
    result += aj[i+1:].count(ai[i])
print(result)

### FIXED CODE ###

import collections

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

result = 0
ai = [0]*n
aj = [0]*n

for i in range(n):
    ai[i] = a[i]+i+1
    aj[i] = i+1-a[i]
aj_num = collections.Counter(aj)
    
for i in range(n-1):
    aj_num[aj[i]] -= 1
    result += aj_num[ai[i]]
    
print(result)
### BUGGY CODE ###

def scheduler(N, A):
    days = 0
    while True:
        games = []
        no_player = True
        for i in range(N):
            if len(A[i]):
                no_player = False
                oppo = A[i][0] -1
                if A[oppo][0] - 1 == i:
                    games.append(i)
        if no_player:
            break
        days += 1
        if len(games) == 0:
            return(-1)
        for game in games:
            del A[game][0]
    return(days)

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

print(scheduler(N, A))

### FIXED CODE ###

def list_up_next_games(players):
    games = set()
    for p in players:
        if A[p]:
            opponent = A[p][-1] - 1
            if A[opponent][-1] - 1 == p:
                if p < opponent:
                    games.add((p, opponent))
                else:
                    games.add((opponent, p))
    return(games)

N = int(input())
A = [list(map(int, input().split())) for i in range(N)]
for i in range(N):
    A[i].reverse()

games = list_up_next_games(list(range(N)))

done_games = []
days = 0
while games:
    days += 1
    players = []
    for game in games:
        done_games.append(game)
        A[game[0]].pop()
        A[game[1]].pop()
        players.append(game[0])
        players.append(game[1])
    games = list_up_next_games(players)

if len(done_games) == N*(N-1)//2:
    print(days)
else:
    print(-1)
### BUGGY CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    ans = 1
    threshold = 1000000000000000000
    for x in A:
        ans *= x
    if (ans > threshold):
        print(-1)
    else:
        print(ans)


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    ans = 1
    threshold = 1000000000000000000
    if 0 in A:
        print(0)
        exit()

    for x in A:
        ans *= x
        if (ans > threshold):
            print(-1)
            exit()
    print(ans)


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

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

num=0
n=int(input())
top=list(map(int,input().split()))
mid=list(map(int,input().split()))
und=list(map(int,input().split()))
for i in top:
    for j in mid:
        if i <j:
            for k in und:
                if j<k:
                    num+=1
print(num)


### FIXED CODE ###

import sys
import bisect
input = sys.stdin.readline
num=0
n=int(input())
top=list(map(int,input().split()))
mid=list(map(int,input().split()))
und=list(map(int,input().split()))
top.sort()
mid.sort()
und.sort()
for i in mid:
    a=bisect.bisect_left(top,i)
    c=n-bisect.bisect_right(und,i)
    num+=a*c
print(num)
### BUGGY CODE ###

import sys
 
 
def resolve():
    import math
 
    readline = sys.stdin.readline
 
    N = int(readline())
 
    for i in range(1, N + 1):
        ans = 0
        li = int(math.sqrt(i) // 1)
        for x in range(1, li):
            for y in range(1, li):
                xx = x * x
                yy = y * y
                xy = x * y
                value = (x + y) ** 2 - 4 * (xx + yy + xy - i)
                if value <= 0:
                    continue
                cal = math.sqrt(value)
                z1 = (-(x + y) + cal) / 2
                z2 = (-(x + y) - cal) / 2
                if (1
                        and 1 <= z1
                        and z1 % 1 == 0):
                    ans += 1
                if (1
                        and 1 <= z2
                        and z2 % 1 == 0):
                    ans += 1
        print(ans)
 
 
resolve()

### FIXED CODE ###

import sys


def resolve():
    import numpy as np

    readline = sys.stdin.readline

    N = int(readline())

    f = np.zeros(10001, np.int64)

    for x in range(1, 101):
        for y in range(1, 101):
            for z in range(1, 101):
                n = x * x + y * y + z * z + x * y + y * z + z * x
                if n > 10000:
                    continue
                f[n] += 1
    for i in range(1, N + 1):
        print(f[i])

resolve()
### BUGGY CODE ###

NK=input().split()
N=int(NK[0])
K=int(NK[1])
Hlis=list(map(int,input().split()))
ans=0

if K>=N:
    print(0)
else:
    for i in range(N-K):
        ans+=Hlis[Hlis.index(min(Hlis))]
        Hlis[Hlis.index(min(Hlis))]=10**9
    print(ans)


### FIXED CODE ###

NK=input().split()
N=int(NK[0])
K=int(NK[1])
Hlis=list(map(int,input().split()))
ans=0

if K>=N:
    print(0)
else:
    Hlis.sort()
    for i in range(N-K):
        ans+=Hlis[i]
    print(ans)
### BUGGY CODE ###

s=list(input())
q=int(input())

re=0
for i in range(1,q+1):
    q_i=input().split()
    if q_i==["1"]:
        re+=1    
    else:
        if (q_i[1]=="1" and re%2==0) or (q_i[1]=="2" and re%2==1):
            s=list(q_i[2])+s
        else:
            s=s+list(q_i[2])

if re%2==1:
    s=s[::-1]

s="".join(s)
print(s)

### FIXED CODE ###

from collections import deque

s=list(input())
s=deque(s)
q=int(input())

re=False
for i in range(1,q+1):
    q_i=input().split()
    if q_i[0]=="1":
        re= not re
    else:
        if q_i[1]=="1" and re==False:
            s.appendleft(q_i[2])
        elif q_i[1]=="2" and re==True:
            s.appendleft(q_i[2])
        else:
            s.append(q_i[2])

s=list(s)

if re==True:
    s=s[::-1]

s="".join(s)
print(s)
### BUGGY CODE ###

n = int(input())
a = list(map(int, input().split()))
a.sort()
p = []
while True:
        if len(a) == 0:
           break
        prime = min(a)       
        if len(a) ==  1:
            p.append(prime)
            break    
        if prime != a[1]:
          p.append(prime)    
        i = 0
        while i < len(a):
            if a[i] % prime == 0:
                a.pop(i)
                continue
            i += 1  
print(len(p))

### FIXED CODE ###

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

ans = 0

baisu = [0]*(a[n-1]+1)
an = a[n-1]

for i in range(n):
    a0 = a[i]
    a1 = a0
    while a1 <= an:
        baisu[a1] += 1
        a1 += a0


for i in range(n):
    if baisu[a[i]] == 1:
        ans += 1
print(ans)
### BUGGY CODE ###

import collections

def get_input_line():
    return list(map(int, input().split()))
n, k = get_input_line()
p_list = get_input_line()

def calc_dice_score(p):
    return 0.5*(p+1)

def calc_score(score_list):
    return sum(score_list)

dice_scores = [0] * n

max_score = 0

for i in range(k):
    dice_scores[i] = 0.5*(p_list[i]+1)

for i in range(n- k + 1):
    dice_scores[i+k-1] = 0.5*(p_list[i+k-1]+1)
    max_score = max(max_score, sum(dice_scores[i:i+k]))
print(max_score)

### FIXED CODE ###

import collections

def get_input_line():
    return list(map(int, input().split()))
n, k = get_input_line()
p_list = get_input_line()

def calc_dice_score(p):
    return 0.5*(p+1)

def calc_score(score_list):
    return sum(score_list)

dice_scores = [0] * n

max_score = 0
tmp_score = 0

for i in range(k):
    dice_scores[i] = 0.5*(p_list[i]+1)
    tmp_score += dice_scores[i]

max_score = tmp_score
for i in range(1, n- k + 1):
    dice_scores[i+k-1] = 0.5*(p_list[i+k-1]+1)
    tmp_score -= dice_scores[i-1]
    tmp_score += dice_scores[i+k-1]
    max_score = max(max_score, tmp_score)
print(max_score)
### BUGGY CODE ###

def BFS(x):
  cnt=1
  v=deque([x])
  k=0
  zu[x]=k
  lis=[x]
  roots[x]=x
  
  while len(v)>0:
    a=v.popleft()
    roots[a]=x
    for i in fr[a]:
      if zu[i]==-1:
        zu[i]=zu[a]+1
        v.append(i)
        cnt += 1
        lis.append(i)

          
  return lis

##############################

from collections import deque
N,M,K=map(int,input().split())
A=[0]*M
B=[0]*M
C=[0]*K
D=[0]*K
fr=[ [] for _ in range(N)]
bl=[ set() for _ in range(N)]
zu=[ -1 for _ in range(N)] #訪問済みリスト
roots= [ -1 for _ in range(N)]

for i in range(M):
  A[i],B[i]= map(int,input().split())
  fr[A[i]-1].append(B[i]-1)
  fr[B[i]-1].append(A[i]-1)
for k in range(K):
  C[k],D[k]= map(int,input().split())
  bl[C[k]-1].add(D[k]-1)
  bl[D[k]-1].add(C[k]-1)
fr_set= [set(fr[i]) for i in range(N)]
    
size=[0]*N
pena=[0]*N
for i in range(N):
  if zu[i]==-1:
    kumi=BFS(i) #リスト
    for k in range(len(kumi)):
      size[kumi[k]]=len(kumi)
      
#print(size)
#print(roots)
      
ans=[0 for _ in range(N)]      
for i in range(N):
  ans[i]= size[i]-1
  for j in range(N):
    if i==j:
      pass
    else:
      if roots[j]==roots[i]:
        if j in bl[i] or j in fr_set[i]:
          ans[i] -= 1      
      
print(*ans)


### FIXED CODE ###

def BFS(x):
  cnt=1
  v=deque([x])
  k=0
  zu[x]=k
  lis=[x]
  roots[x]=x
  
  while len(v)>0:
    a=v.popleft()
    roots[a]=x
    for i in fr[a]:
      if zu[i]==-1:
        zu[i]=zu[a]+1
        v.append(i)
        cnt += 1
        lis.append(i)

          
  return lis

##############################

from collections import deque
N,M,K=map(int,input().split())
A=[0]*M
B=[0]*M
C=[0]*K
D=[0]*K
fr=[ [] for _ in range(N)]
bl=[ set() for _ in range(N)]
zu=[ -1 for _ in range(N)] #訪問済みリスト
roots= [ -1 for _ in range(N)]

for i in range(M):
  A[i],B[i]= map(int,input().split())
  fr[A[i]-1].append(B[i]-1)
  fr[B[i]-1].append(A[i]-1)
for k in range(K):
  C[k],D[k]= map(int,input().split())
  bl[C[k]-1].add(D[k]-1)
  bl[D[k]-1].add(C[k]-1)
fr_set= [set(fr[i]) for i in range(N)]
    
size=[0]*N
pena=[0]*N
for i in range(N):
  if zu[i]==-1:
    kumi=BFS(i) #リスト
    for k in range(len(kumi)):
      size[kumi[k]]=len(kumi)
      
      
ans=[0 for _ in range(N)]      
for i in range(N):
  ans[i]= size[i]-1 - len(fr[i])
  for j in bl[i]:
    if roots[j]==roots[i]:
      ans[i] -= 1      
      
print(*ans)
### BUGGY CODE ###

n=int(input())
s_list = []
for _ in range(n):
    s_list.append(input())
s_list.sort()
dic = sorted(set(s_list), key=s_list.index)
max_count=0
ans = []
for d in dic:
    coun = s_list.count(d)
    if max_count < coun:
        ans = [d]
        max_count = coun
    elif max_count == coun:
        ans.append(d)
    else:
        pass


for a in ans:
    print(a)

### FIXED CODE ###

n=int(input())
s_dic = {}
for _ in range(n):
    s = input()
    if s in s_dic:
        s_dic[s] = s_dic[s] + 1
    else:
        s_dic[s] = 1

max_val = max(s_dic.values())
for s in sorted(s_dic):
    if s_dic[s] == max_val:
        print(s)
### BUGGY CODE ###

n, p = map(int, input().split())
s = input()
ans = 0
x0 = [0]*p
for t in s:
  x1 = [0]*p
  z = int(t)
  x1[z%p] = 1
  for j in range(p):
    x1[(10*j+z)%p] += x0[j]
  x0 = x1
  ans += x0[0]
print(ans)

### FIXED CODE ###

n, p = map(int, input().split())
s = input()
x = [1] + [0]*(p-1)
ans = 0
u = 0
if p in [2,5]:
  for i in range(n):
    if int(s[i])%p==0:
      ans += i+1
else:
  for i in range(n-1,-1,-1):
    u = (int(s[i])*pow(10,n-1-i,p)+u)%p
    ans += x[u]
    x[u] += 1
print(ans)
### BUGGY CODE ###

k = int(input())
s = input()
mod = 10**9 + 7
"""
組み合わせ大好きなのにFとけなかったくやしいいいいいいいいいいいいいいいい
"""

def cmb(n, r, mod):
	if (r < 0) or (n < r):
		return 0
	r = min(r, n-r)
	return fact[n]*factinv[r]*factinv[n-r]%mod

N = 2*10**6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用

for i in range(2, N+1):
	fact.append((fact[-1]*i)%mod)
	inv.append((-inv[mod%i]*(mod//i))%mod)
	factinv.append((factinv[-1]*inv[-1])%mod)

ans = 0
for i in range(k+1):
	ans = (ans + cmb(len(s)-1+k-i, len(s)-1, mod)*pow(25, k-i, mod)*pow(26, i, mod)) % mod
print(ans)

### FIXED CODE ###

k = int(input())
s = input()
mod = 10**9 + 7
"""
組み合わせ大好きなのにFとけなかったくやしいいいいいいいいいいいいいいいい
"""

def cmb(n, r, mod):
	if (r < 0) or (n < r):
		return 0
	r = min(r, n-r)
	return fact[n]*factinv[r]*factinv[n-r]%mod

N = 2*10**6  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用

for i in range(2, N+1):
	fact.append((fact[-1]*i)%mod)
	inv.append((-inv[mod%i]*(mod//i))%mod)
	factinv.append((factinv[-1]*inv[-1])%mod)

ans = 0
for i in range(k+1):
	ans = (ans + cmb(len(s)-1+k-i, len(s)-1, mod)*pow(25, k-i, mod)*pow(26, i, mod)) % mod
print(ans)
### BUGGY CODE ###



def cal():
    number = int(input())
    strList1 = []
    for i in range(number):
        strList1.append(list(map(str, input().rstrip().split())))
    strList2 = [strList1[0]]
    for each in strList1:
        flag = 1
        for item in strList2:
            if item == each:
                flag = 0
                break
        if flag == 1:
            strList2.append(each)
    print(len(strList2))


cal()




### FIXED CODE ###



def cal():
    number = int(input())
    strList = []
    for i in range(number):
        temp = input()
        strList.append(temp)

    count = {}

    for item in strList:
        count[item] = count.get(item, 0) + 1
    print(len(count))


cal()