Harryxun/stf_run huggingface dataset:
N=int(input())
S=str(input())
list_R=[]
list_G=[]
list_B=[]
count=0
for i in range(N):
    if S[i]=="R":
        list_R.append(i)
    if S[i]=="G":
        list_G.append(i)
    if S[i]=="B":
        list_B.append(i)
for i in range(N):
    for j in range(N):
        if i+2*j>N-1:
            break
        if S[i]!=S[i+j] and S[i+j]!=S[i+j*2] and S[i+2*j]!=S[i]:
            count=count+1

print(len(list_B)*len(list_G)*len(list_R)-count)
        


### FIXED CODE ###

N=str(input())
for i in range(len(N)):
    if int(N[i]) == 7:
        print("Yes")
        exit(0)
print("No")
S = input()
K = int(input())
if len(S) >= K:
  print(S[0:K] + '...')
else:
  print(S)


### FIXED CODE ###

K = int(input())
S = input()
if len(S) > K:
  print(S[0:K] + '...')
else:
  print(S)
def solve(n):
  ans = n * (n + 1) - 1  # 1とk 自信

  i = 2
  while i * i <= n:
      num = n // i
      min_i = i * i
      max_i = i * num
      ans += (num - i + 1) * (min_i + max_i)  # 自分自身
      ans -= min_i
      i += 1
  print(ans)
  return True

if __name__ = "__main__":
  n = int(input())
  solve(n)

### FIXED CODE ###

#!/usr/bin/env python3
# input
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
ans = n * (n + 1) - 1  # 1とk 自信

i = 2
while i * i <= n:
    num = n // i
    min_i = i * i
    max_i = i * num
    ans += (num - i + 1) * (min_i + max_i)  # 自分自身
    ans -= min_i
    i += 1
print(ans)
n,m,x=map(int,input().split())
s=sum(int(i)<x for i in input.split())
print(min(s,m-s))

### FIXED CODE ###

n,m,x=map(int,input().split())
s=sum(int(i)<x for i in input().split())
print(min(s,m-s))
a,b,x = map(int,input().split())
import numpy as np
if x<=(a*a*b)/2:
    A = 2*x/(a*b*b)
    Z = A
    print(A)
    print(np.arctan(Z)*180/(np.pi))
else:
    A = a*a*b-x
    B = (a*a)/A
    Z = B
    print(np.arctan(Z)*180/np.pi)

### FIXED CODE ###

import math
a,b,x = map(int,input().split())
if x/(a*a) <= (b/2):
    ans = 2*x/(a*b*b)
    print(90-math.degrees(math.atan(ans)))
else:
    ans = (2*a*a*b-2*x)/(a*a*a)
    print(math.degrees(math.atan(ans)))
a,b,c,d=map(int,input().split())
e=c-a
f=d-b
g=c-f
h=d+e
i=g-e
j=h-f
print(g)
print(h)
print(i)
print(j)

### FIXED CODE ###

n=int(input())
if(n%2==0):
  k=(n/2)*(n/2)
else:
  k=int(n/2)*(int(n/2)+1)
print(int(k))
import math
# import numpy as np  # Pythonのみ！
# from operator import xor
# import re
# from scipy.sparse.csgraph import connected_components  # Pythonのみ！
# ↑cf.  https://note.nkmk.me/python-scipy-connected-components/
# from scipy.sparse import csr_matrix
# import string
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    A,B=map(int,input().split())
    val=A* B // math.gcd(A, B)
    print(val)

resolve()

### FIXED CODE ###

sol=[1,2,3]
ch_1=int(input())
ch_2=int(input())
sol.remove(ch_1)
sol.remove(ch_2)
print(sol[0])
n,m=map(int, input().split())

roads=[]

for _ in range(m):
  a,b=map(int, input().split())
  roads.append([a,b].sort())
  
group=[i for i in range(n)]

group2=[]

while group2!=group:
  group2=group
  for road in roads:
    group[road[1]-1]=group[road[0]-1]

counter=1
for i in range(n-1):
  if group[i]!=group[i+1]:
    counter+=1
    
print(counter-1) 
      

### FIXED CODE ###

class UnionFind:
    from typing import List, Set

    def __init__(self, n):
        self.n = n
        self.parent = [-1] * n

    def merge(self, x, y) -> int:
        x = self.leader(x)
        y = self.leader(y)

        if x == y:
            return 0

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

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

        return self.parent[x]

    def same(self, x, y) -> bool:
        return self.leader(x) == self.leader(y)

    def leader(self, x) -> int:
        if self.parent[x] < 0:
            return x
        else:
            self.parent[x] = self.leader(self.parent[x])
            return self.parent[x]

    def size(self, x) -> int:
        return -self.parent[self.leader(x)]

    def groups(self) -> List[Set[int]]:
        groups = dict()

        for i in range(self.n):
            p = self.leader(i)
            if not groups.get(p):
                groups[p] = set()
            groups[p].add(i)

        return list(groups.values())


def main():
    N, M = map(int, input().split())

    uf = UnionFind(N)

    for _ in range(M):
        # UnionFindを0スタートで実装しているので、入力から1引きます
        A, B = map(lambda x: int(x) - 1, input().split())  
        uf.merge(A, B)  # AとBをmergeします。union, uniteとも呼ばれます。

    print(len(uf.groups()) - 1)


if __name__ == '__main__':
    main()
import collections

n = int(input())

x = []
y = []
for i in range(n):
    xx, yy = map(int, input().split())
    x.append(xx)
    y.append(yy)

vec = []
vec_set = []

for i in range(n):
    vec2 = []
    for j in range(n):
        vec2.append((x[i] - x[j], y[i] - y[j]))
        vec_set.append((x[i] - x[j], y[i] - y[j]))
    vec.append(vec2)

cc = collections.Counter(vec_set)

v_l = []
for key,value in cc.items():
    if key != (0,0):
        v_l.append(value)
print(n - max(v_l))

### FIXED CODE ###

import collections

n = int(input())

x = []
y = []
for i in range(n):
    xx, yy = map(int, input().split())
    x.append(xx)
    y.append(yy)

vec = []
vec_set = []

for i in range(n):
    vec2 = []
    for j in range(n):
        vec2.append((x[i] - x[j], y[i] - y[j]))
        vec_set.append((x[i] - x[j], y[i] - y[j]))
    vec.append(vec2)

cc = collections.Counter(vec_set)

v_l = []
for key,value in cc.items():
    if key != (0,0):
        v_l.append(value)
if len(v_l) != 0:
    print(n - max(v_l))
else:
    print(1)
a = list(map(int, input().split()))
print(*i) for i in a.sort()


### FIXED CODE ###

a = list(map(int, input().split()))
a.sort()
print(" ".join(map(str, a)))
# -*- coding: utf-8 -*-

k, s = map(int, input().split())

ans = 0

for i in range(k+1):
    for j in range(k+1):
        k2 = s - j - i
        if 0 <= k2 <=k:
            ans += 1

        # あれTLEだ
        # if k2 > k or k2 < 0:
        #     continue
        # if s == i + j + k2:
        #     ans += 1

print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-

s = input()

print(s.replace(',', ' '))
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
list=[a,b,c,d,e]
min=100
for i in range(len(list)):
    if list[i]%10!=0 and list[i]%10<min:
        memo=list[i]
        min=list[i]%10
flag=0
for k in range(len(list)):
    if list[k]==memo and flag==0:
        flag=1
    else:
        while list[k]%10!=0:
            list[k]+=1
print(sum(list))


### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
list=[a,b,c,d,e]
if a%10==0 and b%10==0 and c%10==0 and d%10==0 and e%10==0:
    print(sum(list))
    exit()
min=100
for i in range(len(list)):
    if list[i]%10!=0 and list[i]%10<min:
        memo=list[i]
        min=list[i]%10
flag=0
for k in range(len(list)):
    if list[k]==memo and flag==0:
        flag=1
    else:
        while list[k]%10!=0:
            list[k]+=1
print(sum(list))
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,n.count(l[i])-m.count(l[i])) for i in range(l))


### FIXED CODE ###

n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
# coding: utf-8
     
    N, M = tuple(map(int, input().split()))
     
    graph = [ [] for i in range(N+1)]
    for i in range(M):
        a, b = tuple(map(int, input().split()))
        graph[a].append(b)
        graph[b].append(a)
     
    res = "IMPOSSIBLE"
    for i in range(2, N):
        if 1 in graph[i] and N in graph[i]:
            res = "POSSIBLE"
     
    print(res)




### FIXED CODE ###

import sys 

N,M  = map(int,input().split())
     
a = [[0 for i in range(2)] for j in range(M)]
b = [] 
c = []

for i in range(M):
  a[i][0] , a[i][1] = map(int,input().split())
  first, second = a[i][0],a[i][1]
  if first == 1:
    b.append(second)
  if second == N:
    c.append(first)

b_set = set(b)
c_set = set(c)

if list(b_set & c_set) is None or len(list(b_set & c_set)):
  res = ('POSSIBLE')
else:
  res = ('IMPOSSIBLE')

print(res)
n, x = map(int, input().split())
l = [input() for i in range(n)]
l.sort()
total = 0

for i in range(n):
  total += int(l[n-1])
  if x < total:
    print(n)
print(n)

### FIXED CODE ###

s = list(input())
price = 700

for t in s:
    if t == "o":
        price += 100

print(price)
A,B,C,D=map(int,input())
if(A/D<C/B):
  print('No')
else:
  print('Yes')


### FIXED CODE ###

A,B,C,D=map(int,input().split())
atA=0
atC=0
while(A>0):
    A-=D 
    atA+=1 
while(C>0):
    C-=B 
    atC+=1
#print(atA,atC)
if(atA>=atC):
    print('Yes')
else:
    print('No')
h,w,m = map(int,input().split())
row = [0]*(h+1)
col = [0]*(w+1)
bombs = set([])
for i in range(m):
  a,b = map(int,input().split())
  row[a] += 1
  col[b] += 1
  bombs.add((a,b))
r,c = max(row),max(col)
rcnt,ccnt = 0,0
for v in row:
  if v==r:
    rcnt += 1
for v in col:
  if v==c:
    ccnt += 1
doubled = 0
for i,j in bombs:
  if row[i]==r and col[j]==c:
    doubled += 1
if doubled==rcnt*ccnt:
  print(r+c-1)
else:
  print(r+c)

### FIXED CODE ###

n,x,t = map(int,input().split())
print(-(-n//x)*t)
n1 = int(input())
n2 = list(map(int, input().split()))
n3 = [n2[i] - n2[i+1] >= 0 for i in range(n1-1)]
if n2 == 0:
    print(0)
a1 = []
a2 = 0
for i in range(len(n3)):
    if n3[i]:
        a2 += 1
        if i == len(n3) - 1:
            a1.append(a2)
    else:
        a1.append(a2)
        a2 = 0
print(max(a1))

### FIXED CODE ###

n1 = int(input())
n2 = list(map(int, input().split()))
if n1 == 1:
    print(0)
else:
    n3 = [n2[i] - n2[i+1] >= 0 for i in range(n1-1)]
    a1 = []
    a2 = 0
    for i in range(len(n3)):
        if n3[i]:
            a2 += 1
            if i == len(n3) - 1:
                a1.append(a2)
        else:
            a1.append(a2)
            a2 = 0
    print(max(a1))
import math
n, m = map(int, input().split())
a = list(map(int, input().split()))
num = 1
for x in a:
    num = num * (x//2) // math.gcd(num, x//2)
cnt = 0
print(m//num-(m//num)//2)

### FIXED CODE ###

import math
import fractions
n, m = map(int, input().split())
a = list(map(int, input().split()))
num = 1
cnt = []
for x in a:
    c = 0
    for i in range(int(math.log(x,2))):
        if x>>c&1:
            break
        else:
            c+=1
    cnt.append(c)
if max(cnt) != min(cnt):
    print(0)
else:
    for x in a:
        num = num * (x//2) // fractions.gcd(num, x//2)
    print(m//num-(m//num)//2)
s=str(input())
y=700
x=0
while x!=2
if s[x]=o：
　　　y+100
x+=1
print(y)

### FIXED CODE ###

S = input()
s = S.count('o')*100
 
print(700+s)
from heapq import heappush, heappop


def solve(X, Y, Z, K, As, Bs, Cs):
    As.sort()
    Bs.sort()
    Cs.sort()
    ADs = [a2 - a1 for a1, a2 in zip(As, As[1:])][::-1]
    BDs = [a2 - a1 for a1, a2 in zip(Bs, Bs[1:])][::-1]
    CDs = [a2 - a1 for a1, a2 in zip(Cs, Cs[1:])][::-1]

    m = As[-1] + Bs[-1] + Cs[-1]
    h = []
    ans = [m]
    heappush(h, (ADs[0], (0, -1, -1)))
    heappush(h, (BDs[0], (-1, 0, -1)))
    heappush(h, (CDs[0], (-1, -1, 0)))
    taken = set()
    
    for i in range(K - 1):
        p, stacks = heappop(h)
        while (p, stacks) in taken:
            p, stacks = heappop(h)
        taken.add((p, stacks))
        ans.append(m - p)

        if stacks[0] + 1 < len(ADs):
            heappush(h, ((p + ADs[stacks[0] + 1]), (stacks[0] + 1, stacks[1], stacks[2])))
        if stacks[1] + 1 < len(BDs):
            heappush(h, ((p + BDs[stacks[1] + 1]), (stacks[0], stacks[1] + 1, stacks[2])))
        if stacks[2] + 1 < len(CDs):
            heappush(h, ((p + CDs[stacks[2] + 1]), (stacks[0], stacks[1], stacks[2] + 1)))

    return "\n".join([str(a) for a in ans])


if __name__ == "__main__":
    X, Y, Z, K = tuple(map(int, input().split(" ")))
    As = list(map(int, input().split(" ")))
    Bs = list(map(int, input().split(" ")))
    Cs = list(map(int, input().split(" ")))
    print(solve(X, Y, Z, K, As, Bs, Cs))


### FIXED CODE ###

from heapq import heappush, heappop


def solve(X, Y, Z, K, As, Bs, Cs):
    As.sort()
    Bs.sort()
    Cs.sort()
    ADs = [a2 - a1 for a1, a2 in zip(As, As[1:])][::-1]
    BDs = [a2 - a1 for a1, a2 in zip(Bs, Bs[1:])][::-1]
    CDs = [a2 - a1 for a1, a2 in zip(Cs, Cs[1:])][::-1]

    m = As[-1] + Bs[-1] + Cs[-1]
    h = []
    ans = [m]
    if ADs:
        heappush(h, (ADs[0], (0, -1, -1)))
    if BDs:
        heappush(h, (BDs[0], (-1, 0, -1)))
    if CDs:
        heappush(h, (CDs[0], (-1, -1, 0)))
    taken = set()

    for i in range(K - 1):
        p, stacks = heappop(h)
        while (p, stacks) in taken:
            p, stacks = heappop(h)
        taken.add((p, stacks))
        ans.append(m - p)

        if stacks[0] + 1 < len(ADs):
            heappush(h, ((p + ADs[stacks[0] + 1]), (stacks[0] + 1, stacks[1], stacks[2])))
        if stacks[1] + 1 < len(BDs):
            heappush(h, ((p + BDs[stacks[1] + 1]), (stacks[0], stacks[1] + 1, stacks[2])))
        if stacks[2] + 1 < len(CDs):
            heappush(h, ((p + CDs[stacks[2] + 1]), (stacks[0], stacks[1], stacks[2] + 1)))

    return "\n".join([str(a) for a in ans])

if __name__ == "__main__":
    X, Y, Z, K = tuple(map(int, input().split(" ")))
    As = list(map(int, input().split(" ")))
    Bs = list(map(int, input().split(" ")))
    Cs = list(map(int, input().split(" ")))
    print(solve(X, Y, Z, K, As, Bs, Cs))
n =int(input())
import math
ans = 1
for _ in range(n):
    t = int(input())
    ans = ans * t // math.gcd(ans, t)
print(ans)


### FIXED CODE ###

n =int(input())
import fractions
ans = 1
for _ in range(n):
    t = int(input())
    ans = ans * t // fractions.gcd(ans, t)
print(ans)
a,b,c = map(int, raw_input().split())
d = (int)(b/a)
print(min(d, c))

### FIXED CODE ###

a, b, c = (int(i) for i in input().split())  
print(min(c,(int)(b/a)))
data = input()
data_list = [c for c in data]
# print(data_list)
count = 1
delete_count = 0
while ('0' in data_list) and ('1' in data_list):
    if count == len(data_list):
        count = 1

    if data_list[count - 1] != data_list[count]:
        del data_list[count - 1: count + 1]
        delete_count += 2
        # count = 1
    else:
        count += 1

print(delete_count)


### FIXED CODE ###

data = input()
data_list = [c for c in data]
# print(data_list)
count = 1
delete_count = 0
number_of_one = data_list.count('1')
number_of_zero = data_list.count('0')

min_num = min(number_of_zero, number_of_one)
print(min_num * 2)
if __name__ == '__main__':
	l = input().split()

	for i in range(l):
		l[i] = int(l[i])
	W, H, x, y, r = l[0], l[1], l[2], l[3], l[4]

	if x >= r and y >= r:
		if x <= W - r and y <= H - r:
			print("Yes")
		else:
			print("No")
	else:
		print("No")



### FIXED CODE ###

if __name__ == '__main__':
	l = input().split()

	for i in range(len(l)):
		l[i] = int(l[i])
	W, H, x, y, r = l[0], l[1], l[2], l[3], l[4]

	if x >= r and y >= r:
		if x <= W - r and y <= H - r:
			print("Yes")
		else:
			print("No")
	else:
		print("No")
import math
from functools import reduce
n,xs=map(int,input().split())

x=[abs(int(i)-xs) for i in input().split()]

def gc(numbers):
    return reduce(math.gcd, numbers)

print(gc(x))

### FIXED CODE ###

def gcd(a, b):

	while b:

		a, b = b, a % b

	return a

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

x=[abs(int(i)-xs) for i in input().split()]

ans=x[0]
for i in range(n):
    ans=gcd(ans,x[i])

print(ans)
N,K = [int(i) for i in input().split()]
D = [int(i) for i in input().split()]
use = [0,1,2,3,4,5,6,7,8,9]
Keta = []
Keta.append(N // 1000)
Keta.append(N % 1000 // 100)
Keta.append(N % 1000 % 100 // 10)
Keta.append(N % 1000 % 100 % 10)
#print("Keta is {}".format(Keta))
Keta_Min = []

for i in range(len(D)):
    use.remove(D[i])
#print("use is {}".format(use))
for i in range(4):
    A = []
    for j in range(len(use)):
        if Keta[i] <= use[j]:
            A.append(use[j])
    #print(i,A)
    Keta_Min.append(min(A))

Answer = 0
Answer = Keta_Min[0] * 1000 + Keta_Min[1] * 100 + Keta_Min[2] * 10 + Keta_Min[3]
print(Answer)


### FIXED CODE ###

N,K = [int(i) for i in input().split()]
#D = [int(i) for i in input().split()]は数値代入
#文字列を複数代入
D = input().split()
#集合に置き換える(型はset)
D = set(D)
use = set(['0','1','2','3','4','5','6','7','8','9'])
use -= D

for i in range(N,100*N):
    if use >= set(str(i)):
        print(i)
        break
import numpy as np

N,M,K = map(int,input().split())
A = np.array(input().split(),dtype=int)
B = np.array(input().split(),dtype=int)

AA = np.insert(A,0,0)
BB = np.insert(B,0,0)
AAA = np.cumsum(AA)
BBB = np.cumsum(BB)
max_mins = 0
max_books = 0
for a in enumerate(AAA):
    if a[1] > K:
        break
    for b in enumerate(BBB):
        if a[2] + b[1] > K:
            break
        if a[0] + b[0] > max_books:
            max_books = a[0] + b[0]
print(max_books)            


### FIXED CODE ###

import numpy as np
from bisect import bisect

N,M,K = map(int,input().split())
A = np.array(input().split(),dtype=int)
B = np.array(input().split(),dtype=int)

AA = np.insert(A,0,0)
BB = np.insert(B,0,0)
AAA = np.cumsum(AA)
BBB = np.cumsum(BB)
max_books = 0
for a in enumerate(AAA):
    if a[1] > K:
        break
    books = a[0]
    ind = bisect(BBB,K - a[1])
    books += (ind-1)
    max_books = max(books,max_books)
print(max_books)
from collections import Counter

def nCr(n,r):
  ret = 1
  for i in range(r):
    ret *= (n-i)
    ret //= i+1
  return ret    

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

ans = 0
if p == 2 or p == 5:
  for i in range(n):
    if int(s[i]) % p == 0:
      ans += (i+1)
      
else:      
  mods = [0]*(n+1)
  mods[0] = 1
  m = 0
  d = 1  
  for i in range(n):    
    m = (m + int(s[-i-1])*d) % p
    d = (d * 10) % p    
    mods[m] += 1
  
  for i in range(p+1):
    ans += mods[i]*(mods[i]-1)//2

print(ans)      

### FIXED CODE ###

from collections import Counter

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

ans = 0
if p == 2 or p == 5:
  for i in range(n):
    if int(s[i]) % p == 0:
      ans += (i+1)

else:      
  mods = [0]*p
  mods[0] = 1
  m = 0
  d = 1  
  for i in range(n):
    m = (m + int(s[-i-1])*d) % p
    d = (d * 10) % p    
    mods[m] += 1
  
  for i in range(p):
    ans += mods[i]*(mods[i]-1)//2

print(ans)
from collections import deque, defaultdict
from copy import deepcopy
import sys
import resource

resource.setrlimit(resource.RLIMIT_STACK, (-1, -1))
sys.setrecursionlimit(10**5)

N ,u, v = map(int,input().split())
graph = defaultdict(deque)
for _ in range(1,N):
    a, b = map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)

depth = dict(zip(list(range(1,N+1)),[-1]*N))

def bfs(s):
    if graph[s]:
        for v in graph[s]:
            if depth[v] == -1:
                depth[v] = depth[s] + 1
                bfs(v)

depth = dict(zip(list(range(1,N+1)),[-1]*N))
depth[v] = 0
bfs(v)
depth_v = deepcopy(depth)

depth = dict(zip(list(range(1,N+1)),[-1]*N))
depth[u] = 0
bfs(u)
depth_u = depth
depth_v = sorted(depth_v.items(), key = lambda x:x[0])
depth_u = sorted(depth_u.items(), key= lambda x:x[0])

MAX = 0
for v,u in zip(depth_v, depth_u):
    if u[1] < v[1]:
        MAX = max(MAX,v[1])
print(MAX-1)


### FIXED CODE ###

from collections import deque, defaultdict
from copy import deepcopy
import sys
import resource

sys.setrecursionlimit(10**5)

N ,u, v = map(int,input().split())
graph = defaultdict(deque)
for _ in range(1,N):
    a, b = map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)

depth = dict(zip(list(range(1,N+1)),[-1]*N))

def bfs(s):
    if graph[s]:
        for v in graph[s]:
            if depth[v] == -1:
                depth[v] = depth[s] + 1
                bfs(v)

depth = dict(zip(list(range(1,N+1)),[-1]*N))
depth[v] = 0
bfs(v)
depth_v = deepcopy(depth)

depth = dict(zip(list(range(1,N+1)),[-1]*N))
depth[u] = 0
bfs(u)
depth_u = depth
depth_v = sorted(depth_v.items(), key = lambda x:x[0])
depth_u = sorted(depth_u.items(), key= lambda x:x[0])

MAX = 0
for v,u in zip(depth_v, depth_u):
    if u[1] < v[1]:
        MAX = max(MAX,v[1])
print(MAX-1)
A, B = map(int, input().split())

if A==B:
    print("Draw")
elif A>B or A==1:
    print("Alice")
elif:　A<B or B==1:
    print("Bob")

### FIXED CODE ###

A, B = map(int, input().split())

if A==B:
    print("Draw")
elif (A>B and B != 1) or A==1:
    print("Alice")
else:
    print('Bob')
#cording; UTF-8

x = raw_input().split()
y = map(int,x)

a = y[0]
b = y[1]
s = a*b
l  = 2*(a+b)
print(s, l)


### FIXED CODE ###

#cording; UTF-8
a,b=[int(x) for x in input().split()]

S = a*b
L = 2*(a+b)
print(S,L)
n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(map(int, input().split()))
for i in range(m):
    B.append(int(input()))

C = []
for i in range(n):
    C.append(0)
    for j in range(m):
        C[i] += int(A[i][j]) * B[j]
    print(C[i])

### FIXED CODE ###

n, m = map(int, input().split())
A = []
B = []
for i in range(n):
    A.append(input().split())
for i in range(m):
    B.append(int(input()))

C = []
for i in range(n):
    C.append(0)
    for j in range(m):
        C[i] += int(A[i][j]) * B[j]
    print(C[i])
n = int(input())
li = [int(str(i)*3) for i in range(9)]
import bisect
x = bisect.bisect_left(li,n)
print(li[x])

### FIXED CODE ###

n = int(input())
li = [int(str(i)*3) for i in range(10)]
import bisect
x = bisect.bisect_left(li,n)
print(li[x])
N = int(input())
if N % 7 == 0:
  print('Yes')
else:
  while(N>0):
  	if N%4 == 0:
      print('Yes')
      break
  	else:
    	N = N - 7
  else:
  	print('No')


### FIXED CODE ###

N = int(input())
if N % 7 == 0:
  print('Yes')
else:
  while(N>0):
    if N%4 == 0:
      print('Yes')
      break
    else:
      N = N - 7
  else:
    print('No')
import itertools

N = int(input())

lst = []
# listにN個の数値を格納
for i in range(N):
    lst.append(int(input()))

l_sum = sum(lst)

p_list = []

if l_sum % 10 == 0:
    
    # enumerate()関数を使うと、forループの中でリスト（配列）インデックス番号（カウント、順番）を取得できる
    # i にインデックス番号が入る

    for i, _ in enumerate(lst, 1):
        # permutations()を使うと 第2引数分の全パターンを取得できる
        for j in itertools.permutations(lst, r=i):  # rには1、2、3と渡される
            p_list.append(j)
    
    q_list = sorted(set(list(map(sum, p_list))),reverse=True)
    
    x = 0
    for i, item in enumerate(q_list, 1):
        if item % 10 != 0 :
            print(item)
            x = 1
            break
    
    if x = 0:
        print(0)

else:
    print (l_sum)




### FIXED CODE ###

N = int(input())

lst = []
# listにN個の数値を格納
for i in range(N):
    lst.append(int(input()))

lst.sort()
lstsum = sum(lst)
p_list = [ i / 10 for i in lst if i % 10 != 0 ]

if len(p_list) == 0:
    print(0)
elif lstsum % 10 != 0:
    print(lstsum)
else:
    for i in range(N):
        ans = lstsum - lst[i]
        if ans % 10 != 0:
            print(ans)
            exit(0)
N, M = map(int, input().split())
P = [input().split() for i in range(M)]

A=[int(P[0][0]), int(P[0][1])]

for i in range (1, M):
	if int(P[i][0]) <= A[1]:
		A[0] = max(A[0], int(P[i][0]))
		A[1] = min(A[1], int(P[i][1]))
	else:
		A=[]

if len(A) >0:
	choniki = list(range(A[0], A[1]+1))           
	print(len(choniki))
else:
	print(0)   

### FIXED CODE ###

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

P = [0]*(N+1)

for i in range (0, M):
	A, B = map(int, input().split())
	P[A-1]+=1
	P[B]-=1
    
for i in range (1, N+1):
	P[i]+=P[i-1]
    
P = sorted(P, reverse = True)

count = 0

for i in range (0, N+1):
	if P[i] == M:
		count+=1
	else:
		print(count)
		exit()
# coding: utf-8

# In[1]:

import sys
input = sys.stdin.readline
N = int(input())


# In[2]:

import numpy as np


# In[9]:

#sum_ = 0
a = np.arange(1, N//2)
print(np.sum(N/a[(N/a-1)%1==0]-1))
#print(a)
#print(np.sum(a[N//a==N%a]))
#print(a)
#for m in range(1, (N-2)//2):
#    if (N-m)%m==0:
#        print(m)
#        sum_ += (N-m)/m
#print(sum_)


# In[ ]:





### FIXED CODE ###


# coding: utf-8

# In[10]:

import sys
#import math
#input = sys.stdin.readline
N = int(input())


# In[13]:

sum_ = 0
#print(math.sqrt(N))
#print(int(math.sqrt(N)))
#print(int(N**0.5))
rn = N**0.5
if rn%1 == 0:
    rn -= 1
for i in range(1, int(rn)+1):
    if N%i == 0 and i < N//i-1:
        #print(i)
        #print(N/i-1)
        sum_ += N/i-1
print(int(sum_))


# In[ ]: