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

N=input()
s=input()

N=int(N)
wn=[]
bn=[]
a=0
b=0

for i in range(N):
    j=N-(i+1)
    if(s[j]=="."):
        a+=1
    if(s[i]=="#"):
        b+=1
    bn.insert(0,a)
    wn.append(b)
bn.append(0)
wn.insert(0,0)
#print(bn)
#print(wn)

#score算出
min=1000000
for i in range(N+1):
    score=bn[i]+wn[i]
    if(score<min):
        min=score

print(min)

### FIXED CODE ###

N=input()
s=input()

N=int(N)
wn=[]
bn=[]
a=0
b=0

#各行間よりも前と後ろに何個白（黒）があるかをカウント
wn.append(0)
for i in range(N):
    j=N-(i+1)
    if(s[j]=="."):
        a+=1
    if(s[i]=="#"):
        b+=1
    bn.append(a)
    wn.append(b)

bn.reverse()
bn.append(0)
#print(bn)
#print(wn)

#各行間のscore算出
min=1000000
for i in range(N+1):
    score=bn[i]+wn[i]
    if(score<min):
        min=score

print(min)
### BUGGY CODE ###

X,Y = list(map(int,input().rstrip().split()))
    
if (2*Y-X)%3 == 0:
    a = (2*Y-X)//3
    b = Y-2*a

    a_kaijo = 1
    for i in range(1,a+1):
        a_kaijo *= i
    b_kaijo = 1
    for i in range(1,b+1):
        b_kaijo *= i
    total_kaijo = 1
    for i in range(1,a+b+1):
        total_kaijo *= i
    print(total_kaijo//(a_kaijo*b_kaijo))
    
else:
    print(0)

### FIXED CODE ###

def main():
    X,Y = list(map(int,input().split()))
    mod = 1000000007

    a = (2*Y-X)//3
    b = Y-2*a
    s = (X+Y)//3
    if (2*Y-X)%3 == 0 and 0 <= a and 0 <= b:
        ans = 1
        for n in range(s-min(a,b)+1,s+1):
            ans = (ans*n)%mod
        div = 1
        for n in range(2,min(a,b)+1):
            div = (div*n)%mod

        ans = (ans*pow(div,1000000005,mod))%mod
        print(ans)
    else:
        print(0)

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

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

L=[[0]*2 for i in range(M)]

for i in range(M):
    L[i][0] , L[i][1] = map(int, input().split())

A=[0]*M
B=[0]*M

L=sorted(L ,key=lambda x: x[0])

for i in range(M):
    if L[i][0] == 1:
        A[i]=L[i][1]
    else:
        break
A=A[0:i]

L=sorted(L ,key=lambda x: -x[1])

for i in range(M):
    if L[i][1] == N:
        B[i]=L[i][0]
    else:
        break
B=B[0:i]

if((len(A)==0)or(len(B)==0)):
    print("IMPOSSIBLE")
    exit()
if((max(A)<min(B))or(max(B)<min(A))):
    print("IMPOSSIBLE")
    exit()

for i in B:
    if i == 10**10 : 
        print("IMPOSSIBLE")
        exit()
    if i in A:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")


### FIXED CODE ###

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

L=[[0]*2 for i in range(M)]

for i in range(M):
    L[i][0] , L[i][1] = map(int, input().split())

A=[0]*M
B=[0]*M

L=sorted(L ,key=lambda x: x[0])

for i in range(M):
    if L[i][0] == 1:
        A[i]=L[i][1]
    else:
        break
A=A[0:i]

L=sorted(L ,key=lambda x: -x[1])

for i in range(M):
    if L[i][1] == N:
        B[i]=L[i][0]
    else:
        break
B=B[0:i]

if((len(A)==0)or(len(B)==0)):
    print("IMPOSSIBLE")
    exit()
if((max(A)<min(B))or(max(B)<min(A))):
    print("IMPOSSIBLE")
    exit()

A.sort()
B.sort()
i=0
j=0
while((i<len(A))and(j<len(B))):
    if A[i] == B[j]:
        print("POSSIBLE")
        exit()
    elif A[i] > B[j]:j+=1
    else:i+=1
print("IMPOSSIBLE")
### BUGGY CODE ###

import sys
input = sys.stdin.readline

from collections import deque

q = deque()

def calc(d, c):
    if c&1:
        q.append(d)
    if c == 1:
        return 0
    d *= 2
    if d >= 10:
        return c//2 * 2 + calc(1+d%10, c//2)
    return c//2 + calc(d, c//2)
    

def main():
    M = int(input())
    ans = 0
    for i in range(M):
        d, c = map(int, input().split())
        ans += calc(d, c)
    
    num = q.popleft()
    while len(q) > 0:
        t = q.popleft()
        num += t
        if num >= 10:
            num = 1 + num%10
            ans += 1
        ans += 1
    
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline

from collections import deque

q = deque()

def calc(d, c):
    if c&1:
        q.append(d)
    if c == 1:
        return 0
    d *= 2
    c>>=1
    if d >= 10:
        return c * 2 + calc(1+d%10, c)
    return c + calc(d, c)
    

def main():
    M = int(input())
    ans = 0
    for i in range(M):
        d, c = map(int, input().split())
        ans += calc(d, c)
    
    num = q.popleft()
    while len(q) > 0:
        t = q.popleft()
        num += t
        if num >= 10:
            num = 1 + num%10
            ans += 1
        ans += 1
    
    print(ans)

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

n, q = map(int, raw_input().split())
s = str(raw_input())
ans = []
for i in range(q):
	l, r = map(int, raw_input().split())
	st = s[l-1:r]
	count = 0
	for j in range(len(st)):
		if st[j:j+2] == 'AC':
			count += 1
	ans.append(count)
for i in range(q):
	print ans[i]

### FIXED CODE ###

n, q = map(int, raw_input().split())
s = str(raw_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 = map(int, raw_input().split())
	print t[r-1] - t[l-1]
### BUGGY CODE ###

N = int(input())
A = []
A = input().split()
A = [int(n) for n in A]

B = [int(n+1) for n in range(N)]

for i in range(N-1) :
  for j in range(N-(i+1)) :
    if A[i] > A[i+j+1] :
      a = A[i]
      b = A[i+j+1]
      A[i] = b
      A[i+j+1] = a
      c = B[i]
      d = B[i+j+1]
      B[i] = d
      B[i+j+1] = c

#print('N', N)
#print('A', A)
#print('B', B)

B = [str(n) for n in B]

result = ' '.join(B)

print(result)


### FIXED CODE ###

N = int(input())
A = []
A = input().split()
A = [int(n) for n in A]

B = [int(0) for n in range(N)]

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


#print('N', N)
#print('A', A)
#print('B', B)

B = [str(n) for n in B]

result = ' '.join(B)

print(result)
### BUGGY CODE ###

from sys import stdin
from collections import deque


class BFS():
    def __init__(self, grid_graph):
        # grid表現
        self.graph = grid_graph
        self.H = len(self.graph)
        self.W = len(self.graph[0])
        # 始点からの距離
        self.dist = [[-1]*self.W for i in range(self.H)]
        # キュー
        self.que = deque()

    def bfs(self, sv_arr):
        dx = [ 1, 0,-1, 0]
        dy = [ 0, 1, 0,-1]

        # 初期条件(0-indexed)
        for sv in sv_arr:
            self.dist[sv[0]][sv[1]] = 0
            self.que.append(sv)

        while self.que:
            v = self.que.popleft()
            for _dx, _dy in zip(dx,dy):
                nv = [v[0]+_dx,v[1]+_dy]
                if 0<=nv[0]<self.H and 0<=nv[1]<self.W:
                    if self.dist[nv[0]][nv[1]] != -1:
                        continue
                    self.dist[nv[0]][nv[1]] = self.dist[v[0]][v[1]] + 1
                    self.que.append(nv)


def main():
    _in = [_.rstrip() for _ in stdin.readlines()]
    H, W = list(map(int,_in[0].split(' ')))  # type:list(int)
    graph = []
    for i in range(H):
        _ = list(_in[i+1])  # type:list(str)
        graph.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    bfs = BFS(graph)

    sv_arr = []
    for i in range(H):
        for j in range(W):
            if graph[i][j] == '#':
                sv_arr.append([i,j])
    bfs.bfs(sv_arr)
    cnt = max(sum(bfs.dist,[]))
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from sys import stdin
from collections import deque


class BFS():
    def __init__(self, grid_graph):
        # grid表現
        self.graph = grid_graph
        self.H = len(self.graph)
        self.W = len(self.graph[0])
        # 始点からの距離
        self.dist = [[-1]*self.W for i in range(self.H)]
        # キュー
        self.que = deque()

    def bfs(self, sv_arr):
        dx = [ 1, 0,-1, 0]
        dy = [ 0, 1, 0,-1]

        # 初期条件(0-indexed)
        for sv in sv_arr:
            self.dist[sv[0]][sv[1]] = 0
            self.que.append(sv)

        while self.que:
            v = self.que.popleft()
            for _dx, _dy in zip(dx,dy):
                nv = [v[0]+_dx,v[1]+_dy]
                if not 0<=nv[0]<self.H: continue 
                if not 0<=nv[1]<self.W: continue
                if self.dist[nv[0]][nv[1]] != -1: continue
                self.dist[nv[0]][nv[1]] = self.dist[v[0]][v[1]] + 1
                self.que.append(nv)


def main():
    _in = [_.rstrip() for _ in stdin.readlines()]
    H, W = list(map(int,_in[0].split(' ')))  # type:list(int)
    graph = []
    for i in range(H):
        _ = list(_in[i+1])  # type:list(str)
        graph.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    bfs = BFS(graph)

    sv_arr = []
    for i in range(H):
        for j in range(W):
            if bfs.graph[i][j] == '#':
                sv_arr.append([i,j])

    bfs.bfs(sv_arr)
    cnt = max(max(_) for _ in bfs.dist)
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)


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

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

count = 0
num = 0
for i in range(n):
  m = 0
  for j in range(i, n):
    m = (10*m + int(s[j])) % p
    if(m == 0):
      count += 1
    
print(count)

### FIXED CODE ###

import numpy as np

def a():
  n, p = list(map(int, input().split()))
  num = [int(s) for s in input()]
  
  if(p==2 or p==5):
    count=0
    for i in range(1,n+1):
      if(num[-i]%p == 0):
        count += n-i+1
    print(count)
    return
  
  counts = np.zeros(p)
  tmp = 0
  tens = 1
  for i in range(1,n+1):
    tmp = (tens*num[-i] + tmp) % p
    counts[tmp] += 1
    tens = (tens*10)%p
  ret = int(counts[0] + sum(counts*(counts-1)//2))
  print(ret)
  return
a()
### BUGGY CODE ###

F = [0, 0, 1]
    
while True:
    try:
        N = int(input())
        
        if N > len(F) - 1:
            for i in range(len(F), N+1):
                F.append(F[i-1] + i - 1)
        
        print(F[N])
    except:
        break

### FIXED CODE ###

R = [0, 0, 1]
while True:
    try:
        N = int(input())
        
        if N <= 2:
            print(R[N])
        else:
            print((N-1)*(N-2)//2 + N - 1)
    except:
        break
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10**6)
N = input()
k = len(N)
mod = 10**9+7
def mthd(n):
    x = format(n,"b")
    ln = len(x)
    if x == "1":
        return 3
    elif x == "0":
        return 1
    elif n == 2**(ln)-1:
        return pow(3,ln,mod)
    else:
        l = 2**(ln-1)
        s = n % l
        return (mthd(s)*2+mthd(l-1)) % mod
print(mthd(int(N,2)))

### FIXED CODE ###

N = input()
k = len(N)
mod = 10**9+7
DP = [[0,0] for i in range(k+1)]
DP[0][0] = 1
DP[0][1] = 0
for i in range(1,k+1):
    if N[i-1] == "1":
        DP[i][0] = (DP[i-1][0]*2)%mod
        DP[i][1] = (DP[i-1][1]*3+DP[i-1][0])%mod
    if N[i-1] == "0":
        DP[i][0] = DP[i-1][0]
        DP[i][1] = (DP[i-1][1]*3)%mod
print((DP[k][0]+DP[k][1])%mod)
### BUGGY CODE ###

s = input()
n = int(input())

try_list = []
for i in range(n):
    t = input().split()
    try_list.append(t)

head = 0
for t in try_list:
    # 先頭
    if t[0] == '1':
        # 末尾
        head += 1
    else:
        # 先頭
        if head % 2 == 0:
            if t[1] == '1':
                s = t[2] + s
            else:
                s = s + t[2]
        else:
            if t[1] == '1':
                s = s + t[2]
            else:
                s = t[2] + s
if head % 2 == 0:
    print(s)
else:
    print(''.join(list(reversed(s))))

### FIXED CODE ###

s = input()
n = int(input())

t = ''
for i in range(n):
    q = input().split()
    if len(q) == 1:
        t, s = s, t
    elif len(q) == 3:
        if q[1] == '1':
            t += q[2]
        elif q[1] == '2':
            s += q[2]

t = t[::-1]
print(t + s)
### BUGGY CODE ###

N,K = map(int,input().split()) 
A = [int(i)-1 for i in input().split()]
now = 0

while K:
    if K % 2: 
        now = A[now]
    tmp = A[:]
    for i in range(N):
        tmp[i] = A[A[i]]
    A = tmp[:]
    K //= 2
print(now + 1)

### FIXED CODE ###

N,K = map(int,input().split()) #N = 4,K=5
A = [int(i)-1 for i in input().split()]
log_K = K.bit_length() #3bit (5 = 101)
next = [[-1]*N for _ in range(log_K)]

for i in range(N):
    next[0][i] = A[i]
    
for k in range(log_K - 1):
    for i in range(N):
        next[k+1][i] = next[k][next[k][i]]  

now = 0
for i in range(log_K)[::-1]: 
    if ((K >> i) & 1) == 1: 
        now = next[i][now]
print(now + 1)
### BUGGY CODE ###

S=input()
T=""
L=["dream","dreamer","erase","eraser"] 
for s in S[::-1]:
    T=T+s
    if T[::-1] in L:
        T=""
print("YES" if T=="" else "NO")

### FIXED CODE ###

S=input()[::-1]
T=""
L=["dream","dreamer","erase","eraser"] 
for s in S:
    T=s+T
    if T in L:
        T=""
    elif len(T)>6:
        break
print("YES" if T=="" else "NO")
### BUGGY CODE ###

import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
import numpy as np
#======================================================#
MOD=10**9+7
def main():
    n = II()
    aa = np.array(MII())
    ans = 0
    for i in range(60):
        cnt1 = int(sum(aa&1))
        ans += cnt1*(n-cnt1)*(2**i)
        aa >>= 1
    print(ans%MOD)



if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
import numpy as np
#======================================================#
MOD=10**9+7
def main():
    n = II()
    aa = np.array(MII())
    ans = 0
    for i in range(60):
        cnt1 = int((aa&1).sum())
        ans += cnt1*(n-cnt1)*(2**i)
        aa >>= 1
    print(ans%MOD)

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

import sys


def read():
    return sys.stdin.readline().rstrip()


def main():
    h, w, m = map(int, read().split())
    target = [(0, 0) for _ in range(m)]
    row = [0] * h
    col = [0] * w
    for i in range(m):
        hi, wi = [int(i) - 1 for i in input().split()]
        target[i] = (hi, wi)
        row[hi] += 1
        col[wi] += 1
    r = max(row)
    ri = [i for i in range(h) if row[i] == r]
    c = 0
    for rii in ri:
        ci = col[:]
        for y, x in target:
            if y == rii:
                ci[x] -= 1
        c = max(max(ci), c)
    ans = r + c
    c = max(col)
    ci = [i for i in range(w) if col[i] == c]
    r = 0
    for cii in ci:
        ri = row[:]
        for y, x in target:
            if x == cii:
                ri[y] -= 1
        r = max(max(ri), r)
    ans = max(r + c, ans)
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys


def read():
    return sys.stdin.readline().rstrip()


def main():
    h, w, m = map(int, read().split())
    target = set()
    row = [0] * h
    col = [0] * w
    for _ in range(m):
        hi, wi = [int(i) - 1 for i in input().split()]
        target.add((hi, wi))
        row[hi] += 1
        col[wi] += 1
    row_max = max(row)
    r = [i for i in range(h) if row[i] == row_max]
    col_max = max(col)
    c = [i for i in range(w) if col[i] == col_max]
    for ri in r:
        for ci in c:
            if (ri, ci) not in target:
                print(row_max + col_max)
                return
    print(row_max + col_max - 1)


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

n,m = map(int,input().split())
lis = [int(input()) for i in range(m)]
dp = [0 for i in range(n+2)]
dp[0] = 1
for i in range(n):
  if i+1 not in lis:
    dp[i+1] += dp[i]
    dp[i+1] %= 10 ** 9+7
  if i+2 not in lis:
    dp[i+2] += dp[i]
    dp[i+2] %= 10 ** 9 + 7
print(dp[n])


### FIXED CODE ###

n,m = map(int,input().split())
lis = [int(input()) for i in range(m)]
dp = [0 for i in range(n+2)]
lis.append(0)
dp[0] = 1
cou = 0
co = 0
if lis[0] == 1:co += 1
for i in range(n):
  if i+1 != lis[cou]:
    dp[i+1] += dp[i]
    dp[i+1] %= 10 ** 9+7
  else:
    cou +=1
  if i+2 != lis[co]:
    dp[i+2] += dp[i]
    dp[i+2] %= 10 ** 9 + 7
  else:
    co += 1
print(dp[n])
### BUGGY CODE ###

import sys
results = {}
def fact(n):
    if n in results:
        return results[n]
    ret = [1]
    if n%2==0:
        ret.append(2)
        results[n]=ret
        return ret
    for i in range(3,int(n**0.5)+1,2):
        if n%i==0:
            ret.append(i)
            results[n]=ret
            return ret
    results[n]=ret
    return ret
def isPrime(n):
    if n<=1:
        return False
    if n==2:
        return True
    if fact(n)==[1]:
        return True
    else:
        return False
lines = sys.stdin.readlines()
for line in lines:
    inp = int(line)
    s=0
    for i in range(2,inp+1):
        if isPrime(i):
            s+=1
    print (s)

### FIXED CODE ###

import sys

def primeTable(n):
    list = [True for _ in range(n+1)]
    i = 2
    while i * i <= n:
        if list[i]:
            j = i+i
            while j<= n:
                list[j] = False
                j += i
        i += 1

    table = [i for i in range(n+1) if list[i] and i >= 2]
    return table

lines = sys.stdin.readlines()
primeList = primeTable(999999)

for line in lines:
    inp = int(line)
    primes = list(filter(lambda n:n>=2 and n<=inp, primeList))
    num = len(primes)
    print (num)
### BUGGY CODE ###


N = int(input())
p = 1
for i in range(1, N + 1):
    p *= i
print(p % (10** 9 + 7))

### FIXED CODE ###


N = int(input())
p = 1
for i in range(1, N + 1):
    p = p * i % (10** 9 + 7)
print(p)
### BUGGY CODE ###

N = int(input())
lis = []
for i in range(1,N):
    lis.append(i)
print(sum(lis))

### FIXED CODE ###

N = int(input())
print(N*(N-1)//2)
### BUGGY CODE ###



import sys

sys.setrecursionlimit(10 ** 7)
# ----------

INF = float("inf")
MOD = 10 ** 9 + 7
# ----------

s = list(input().strip())
K = int(input())
N = len(s)

if N == 1:
    print(s[0])
    exit()
sub = set()
for i in range(N):
    for j in range(N):
        sub.add(''.join(s[i:j+1]))

print(sorted(sub)[K])


### FIXED CODE ###


S = input().strip()
K = int(input())
L = len(S)
substr = set()

for i in range(L):
    for j in range(5):
        s = S[i:min(i+j+1, L)]
        if s:
            substr.add(s)

print(sorted(substr)[K-1])
### BUGGY CODE ###

n = int(input())
s = input()

R_inds = []
G_inds = []
B_inds = []

for i in range(n):
    if s[i] == 'R':
        R_inds.append(i)
    elif s[i] == 'G':
        G_inds.append(i)
    else:
        B_inds.append(i)
    
ans = 0
for r in R_inds:
    for g in G_inds:
        for b in B_inds:
            ls = [r,g,b]
            ls.sort()
            if ls[2] - ls[1] != ls[1] - ls[0]:
                ans += 1

print(ans)

### FIXED CODE ###

n = int(input())
s = input()
R_ls = [0] * n
G_ls = [0] * n
B_ls = [0] * n
R_csum = [0] * n
G_csum = [0] * n
B_csum = [0] * n
for i in range(n):
    if s[i] == 'R':
        R_ls[i] = 1
        R_csum[i] = R_csum[i-1] + 1
        G_csum[i] = G_csum[i-1]
        B_csum[i] = B_csum[i-1]
    elif s[i] == 'G':
        G_ls[i] = 1
        G_csum[i] = G_csum[i-1] + 1
        R_csum[i] = R_csum[i-1]
        B_csum[i] = B_csum[i-1]
    else:
        B_ls[i] = 1
        B_csum[i] = B_csum[i-1] + 1
        R_csum[i] = R_csum[i-1]
        G_csum[i] = G_csum[i-1]
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        if (s[i] == 'R' and s[j] == 'G') or (s[i] == 'G' and s[j] == 'R'):
            now = B_csum[-1] - B_csum[j]
            if j + (j-i) < n and s[2*j-i] == 'B':
                now -= 1
        elif (s[i] == 'R' and s[j] == 'B') or (s[i] == 'B' and s[j] == 'R'):
            now = G_csum[-1] - G_csum[j]
            if j + (j-i) < n and s[2*j-i] == 'G':
                now -= 1
        elif (s[i] == 'G' and s[j] == 'B') or (s[i] == 'B' and s[j] == 'G'):
            now = R_csum[-1] - R_csum[j]
            if j + (j-i) < n and s[2*j-i] == 'R':
                now -= 1
        else:
            now = 0
        ans += now
print(ans)
### BUGGY CODE ###

n,k=map(int,input().split())
a=[1]+list(map(int,input().split()))
for i in range(n):
  a[i+1]*=a[i]
for i in range(n-k):
  print(['No','Yes'][a[i+k+1]//a[i+1]>a[i+k]//a[i]])

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-k):
  print(['No','Yes'][a[i+k]>a[i]])
### BUGGY CODE ###

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

# a = b * x + K
ans = 0
for k in range(K,N+1):
  b = k+1
  while (b <= N):
    if k == 0:
      ans += (N-k)//b
    else:
      ans += (N-k)//b +1
    #print(ans,(N-k)//b +1,k,b)
    b += 1
print(ans)

### FIXED CODE ###

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

# a = b * x + K
# bを固定してaを1~Nまで動かしたとき、aをbで割った余りは1,2...b-1,0のb通り。
# その中にK以上の余りはb-K通り。
# 余りを順に並べると、1,2...b-1,0,1,2...b-1,0,1,2...N%b となる。
# 1,2...N%b の中にK以上の数はN%b-K+1通り。
# 1,2...b-1,0はN//b回繰り返される。
# Kが0のときは、a,bはどんな組み合わせでもいいからN**2通り。

if K == 0:
  print(N**2)
  exit()
ans = 0
for b in range(1,N+1):
  if b-K > 0:
    ans += (b-K)*(N//b)
  if N%b-K+1 > 0:
    ans += N%b-K+1
print(ans)
### BUGGY CODE ###

# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


def main():
    N,K = map(int,input().split())
    H = list(map(int,input().split()))

    res = 0
    isNotEmpty = True

    for i in range(K):
        if H == []:
            isNotEmpty = False
            break
        temp = max(H)
        H.remove(temp)

    if isNotEmpty:
        res += sum(H)

    print(res)



main()


### FIXED CODE ###

# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


def main():
    N,K = map(int,input().split())
    H = list(map(int,input().split()))

    if N <= K:
        print(0)
        sys.exit()
    else:
        H.sort()
        temp = H[:N-K]
        res = sum(temp)

    print(res)



main()
### BUGGY CODE ###

# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import math
import sys
input = sys.stdin.readline

D, G = map(int, input().split())
# print(D, G)
P = []
C = []
for i in range(D):
    p,  c = map(int, input().split())
    P.append(p)
    C.append(c)

INF = 10**15


def F(i, n, GetPoint):
    if i == D:
        if GetPoint >= G:
            return n, GetPoint
        else:
            return INF, INF

    PerPoint = (i+1)*100

    if GetPoint < G:
        temp = INF, INF
        for j in range(P[i]+1):
            if j != P[i]:
                N, GP = F(i+1, n+j, GetPoint+j*PerPoint)
            else:
                N, GP = F(i+1, n+j, GetPoint+j*PerPoint + C[i])
            if N < temp[0]:
                temp = N, GP
        return temp
    else:
        return n, GetPoint


print(F(0, 0, 0)[0])


### FIXED CODE ###

# n, m, l = map(int, input().split())

# list_n = list(map(int, input().split()))

# n = input()
# list = [input() for i in range(N)

# list = [[i for i in range(N)] for _ in range(M)]

import math
import sys
input = sys.stdin.readline

D, G = map(int, input().split())
# print(D, G)
P = []
C = []
for i in range(D):
    p,  c = map(int, input().split())
    P.append(p)
    C.append(c)

INF = 10**15


def F(i, n, GetPoint):
    if i == D:
        if GetPoint >= G:
            return n, GetPoint
        else:
            return INF, INF

    PerPoint = (i+1)*100

    if GetPoint < G:
        ANS = INF, INF
        # ALL
        N, GP = F(i+1, n+P[i], GetPoint+PerPoint*P[i] + C[i])
        if N < ANS[0]:
            ANS = N, GP
        # through
        N, GP = F(i+1, n, GetPoint)
        if N < ANS[0]:
            ANS = N, GP

        # part
        # 上位合計
        PupperAll = sum([(j+1)*100*P[j] + C[j] for j in range(i+1, D)])
        rN = math.ceil((G - GetPoint - PupperAll)/PerPoint)
        if 0 < rN < P[i]:
            GP = GetPoint + PerPoint*rN + PupperAll
            N = n + rN + sum(P[i+1:])
            if N < ANS[0]:
                ANS = N, GP

        return ANS
    else:
        return n, GetPoint


print(F(0, 0, 0)[0])
### BUGGY CODE ###

N = int(input())
S = []
for i in range(N):
    item = input()
    if not item in S:
        S.append(item)
    else:
        continue
print(len(S))

### FIXED CODE ###

N = int(input())
S = [input() for i in range(N)]
print(len(set(S)))