peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n=int(input())

x=1
sum=0
while sum<=n:
 sum=x*(x+1)//2
 x+=1
for i in range(1,x):
 if i!=sum-n:
  print(i)
# Judge status: Accepted
A,B,C = map(int,input().split())
K = int(input())
a,b,c = A,B,C
n = 0
while a >= b:
    b *= 2
    n += 1
    if n > K:
        print("No")
        exit()

while b >= c:
    c *= 2
    n += 1
    if n > K:
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
n = int(input())
h = list(map(int, input().split()))

max_ = 0
cnt = 0
for i in range(n - 1, 0, -1):
    if h[i - 1] < h[i]:
        max_ = max(max_, cnt)
        cnt = 0
    else:
        cnt += 1
max_ = max(max_, cnt)        
print(max_)
# Judge status: Accepted
def resolve():
    a, b, c = map(int, input().split())
    a %= b
    for i in range(b):
        if a*i %b == c:
            print("YES")
            exit()
    print("NO")
resolve()
# Judge status: Accepted
n, a, b = list(map(int, input().split()))
if (b - a) % 2 == 0:
    print((b - a) // 2)
else:
    ans = min(a - 1, n - b) + 1
    ans += (b - a - 1) // 2
    print(ans)
# Judge status: Wrong Answer
N,M=map(int,input().split())
L=[[int(i) for i in input().split()][1:] for j in range(N)]
#print(L)
cnt=0
for i in range(1,M+1):
  for j in range(N):
    #print(L[i][1:])
    if i in L[j]:
      break
  else:
    cnt+=1
print(cnt)
# Judge status: Accepted
n = int(input())
t = [int(input()) for _ in range(n)]

def gcd(a,b):
    if b == 0:
        return a
    return gcd (b, a%b)

#2数の積/最大公約数=最小公倍数
def lcm(a,b):
    return a*b//gcd(a,b)

if n == 1:
    print(t[0])
    exit(0)
ans = lcm(t[0], t[1])
for i in range(1, n-1):
    ans = lcm(ans, t[i+1])
print(ans)
# Judge status: Wrong Answer

N, X, Y = input().split()
N = int(N)
X = int(X)
x = X - 1
Y = int(Y)
y = Y -1
ans = [0] * (N-1)
A = [[0] * N for _ in range(N)]
for i in range(N):
    for j in range(N-i):
        path = min(abs(x- i) +1 +abs(y-i-j),j)
        ans[path] += 1
print(*ans, sep='\n')
# Judge status: Accepted
# D - Face Produces Unhappiness

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

score = 0
for i in range(N - 1):
    if S[i] == S[i + 1]:
        score += 1

print(min(score + K * 2, N - 1))
# Judge status: Accepted
n = int(input())
A = list(input())

r = A.count("R")

ans = A[:r].count("W")

print(ans)
# Judge status: Accepted
contest_num = int(input())

if contest_num >= 1999:
    result_str = 'The contest has not been held'

elif contest_num < 1000:
    result_str = 'ABC'

elif contest_num >= 1000:
    result_str = 'ABD'

print(result_str)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
x = 1
list1 = []

count = 0
for i in range(N):
  count += 1
  if A[i] == x:
    list1.append(i)
    count -= 1   
    x += 1
if list1 == []:
  print(-1)
else:
  print(count)
# Judge status: Accepted
L = int(input())
a = L/3
print(a*a*a)
# Judge status: Accepted
a, b = map(int, input().split())
k = 0
for i in range(2):
  if a >= b:
    k += a
    a -= 1
  else:
    k += b
    b -= 1
print(k)
# Judge status: Accepted
import itertools
import numpy as np
n,m,x = map(int,input().split())
c = []
total = [0] * m
ans = float('inf')
finish = False
for i in range(n):
    c.append(list(map(int,input().split())))
for i in range(1,n+1):
    for comb in itertools.combinations(c,i):
        su = np.array(comb).sum(axis=0)
        if sum(su[1:] >= x) == m:
            ans = min(ans,su[0])
if ans != float('inf'):
    print(ans)
else:
    print(-1)
# Judge status: Accepted
import sys

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

def main():
  for i in reversed(range(n-1)):
    if h[i] - h[i+1] > 1:
      return False
      exit()
    elif h[i] - h[i+1] == 1:
      h[i] -= 1
    else:
      continue
  return True

if main() == True:
  print('Yes')
  sys.exit()

h[n-1] -= 1

if main() == True:
  print('Yes')

else:
  print('No')
# Judge status: Accepted
from collections import deque

n = int(input())
l = deque(map(int, input().split()))

while len(l) > 1:
  key = min(l)
  for i in range(len(l)):
    j = l.popleft()
    sup = j % key
    if sup > 0:
      l.append(sup)
  l.append(key)

print(l[0] if len(l) == 1 else 0)
# Judge status: Accepted
import numpy as np
N = int(input())
list_ai = list(map(int,input().split()))
list1 = [x-(i+1) for i,x in enumerate(list_ai)]
a1 = np.array(list1)
median1 = int(np.floor(np.median(a1)))
ans = np.sum(np.abs(a1-median1))
print(ans)
# Judge status: Accepted
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
  print("Yes")
else:
  if abs(a-b)<=d and abs(b-c)<=d:
    print("Yes")
  else:
    print("No")
# Judge status: Accepted
l=[1]
for i in range(2,1000):
  l.append(l[-1]+i)
a,b=map(int,input().split())
print(l[b-a-2]-a)
# Judge status: Accepted
from itertools import product

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

if a > b :
  print(0)
  exit()
elif n == 1:
  if a != b:
    print(0)
    exit()
  else:
    print(1)
    exit()
else:
  print((b-a) * (n-2) + 1)
# Judge status: Accepted
n, m = map(int, input().split())
L = []
R = []
for i in range(m):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)
count = min(R) - max(L) + 1
if count <= 0:
    print(0)
else:
    print(count)
# Judge status: Wrong Answer
startA, finishA, startB, finishB = map(int,input().split())

if finishA <= finishB:
    if startB == startA:
        print(finishB - finishA)
    elif startA <= startB <= finishA:
        print(finishA - startB- startA)
    else:
        print("0")


else:
    if startB == startA:
        print(finishA - finishB)
    elif startA <= startB <= finishB:
        print(finishB - startB)
    else:
        print("0")
# Judge status: Wrong Answer
N=int(input())

if N%2==0:
  print(0.5)
else:
  print((0.5*N+1)/N)
# Judge status: Accepted
x, a, b = map(int, input().split())
if abs(x-a) > abs(x-b):
    print('B')
else:
    print('A')
# Judge status: Accepted
N = int(input())
A = [int(a) for a in input().split()]

Mcashe = 1000
Mkabu = 0

for i in range(len(A) - 1):
    Mcashe += (Mkabu * A[i])
    Mkabu = 0
    if A[i] < A[i+1]:
        Mkabu = Mcashe // A[i]
        Mcashe = Mcashe % A[i] 

Mcashe += (Mkabu * A[-1])
print(Mcashe)
# Judge status: Accepted
N = int(input())
S = input()
ans = [chr((ord(i)-65 +N) % 26 + 65) for i in S]
print(''.join(ans))
# Judge status: Accepted
X = int(input())
if X == 2:
    print(2)
    exit()
while True:
    N = int(X**0.5)
    for i in range(1,N):
        if X % (i+1) == 0:
            break
        else:
          if i == N - 1:
            print(X)
            exit()
    X += 1
# Judge status: Wrong Answer
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

n = readInt()
a = list(set(readInts()))

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

odd = []
even = []

for i in a:
  if i%2==0:
    even.append(i)
  else:
    odd.append(i)

from math import gcd

if len(odd)>0:
  print(1)
  exit()
elif len(even)>0:
  d = even[0]
  for i in range(len(even)):
    d = gcd(even[i],d)
  print(d)
# Judge status: Accepted
N = int(input())
d = list(map(int, input().split()))

d = sorted(d)
print(d[(N//2)] - d[(N//2)-1])
# Judge status: Accepted
n, k = map(int, input().split())

ct = []
for i in range(n):
    c, t = map(int, input().split())
    ct.append([c, t])

ct.sort()

ans = 0
for i in range(n):
    if ct[i][1] <= k:
        ans = ct[i][0]
        break

if ans:
    print(ans)
else:
    print("TLE")
# Judge status: Accepted
a, b, c = [int(x) for x in input().split()]

req = b + c

print((req - a) if req > a else 0)
# Judge status: Accepted
# the answer is always a cube. so calculate the volume of that cube.
total_length = float(input())
single_length = total_length/3
volume = single_length**3
print(volume)
# Judge status: Accepted
def int_(num_str):
    return int(num_str) - 1

N, M = map(int, input().split())
balls = [1] * N
red = {0}
for i in range(M):
    x, y = map(int_, input().split())
    if x in red:
        if balls[x] == 1:
            red.remove(x)
            red.add(y)
        else:
            red.add(y)
    balls[x] -= 1
    balls[y] += 1
print(len(red))
# Judge status: Accepted
N = int(input())
S = [(input()) for i in range(N)] 
print(len(set(S)))
# Judge status: Accepted
s=input()
print('A'+s[8]+'C')
# Judge status: Accepted
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys
import itertools

import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = readline().decode('utf8').rstrip()
se = set(S)

ans = True
for m in se:
    if S.count(m) % 2 != 0:
        ans = False

print('Yes' if ans else 'No')
# Judge status: Wrong Answer
##C - Step
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N):
    print(i,A)
    if not A:
        Idx = A.index(max(A))
        ans += max(A)*(len(A) - Idx) - sum(A[Idx::])
        del A[Idx::]
    else:
        break
print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()));
a.sort()
com = 0;
for k in range(n-1):
    kk = n - (k+1) // 2 - 1
    com += a[kk]
print(com);
# Judge status: Accepted
N, M = map(int, input().split())
if N >= M // 2:
    print(M // 2)
else:
    print((N*2 + M) // 4)
# Judge status: Accepted
n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print(''.join(s))
# Judge status: Accepted
n,d=map(int,input().split(" "))
c=0
for i in range(n):
    x,y=map(int,input().split(" "))
    distance=((x-0)**2+(y-0)**2)**(0.5)
    if distance<=d:
        c+=1
print(c)
# Judge status: Accepted
N = int(input())
lst = [int(x) for x in input().split()]
a = 0
b = 0
for n in lst:
    if n % 4 == 0:
        a += 1
    elif n % 2 == 0:
        b += 1

if b >= 2:
    N = N - (b - 1)

if a >= N // 2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from itertools import permutations
n=int(input())
l=[]
for i in range(n):
    x,y=map(int,input().split())
    l.append((x,y))
dist=[]
for ll in list(permutations(l)):
    d=0.0
    for i in range(len(ll)-1):
        d+=((ll[i][0]-ll[i+1][0])**2+(ll[i][1]-ll[i+1][1])**2)**0.5
    dist.append(d)
print(sum(dist)/len(dist))
# Judge status: Wrong Answer
N = int(input())
L = list(map(int, input().split()))
L.sort()

L_max = L[-1]

cnt = [0]*(L_max+1)

ptr = 0
for i in range(1, L_max+1):
    cnt[i] = cnt[i - 1]
    while ptr < N and i == L[ptr]:
        cnt[i] += 1
        ptr += 1

res = 0
for i in range(N):
    for j in range(i + 1, N):
        res += max(0, cnt[min(L[i], L[j])] - 1 - cnt[abs(L[i] - L[j])])
        if L[i] == L[j]:
            res -= 1

print(res)
# Judge status: Accepted
inputlist = [input() for i in range(4)]

n = 0

A,B,C= inputlist[0],inputlist[1],inputlist[2]

for i in range(int(A)+1):

    X = inputlist[3] 

    X = int(X) - i*500

    for j in range(int(B)+1):

        X = X - j*100

        for k in range(int(C)+1):
            
            X = X -k*50

            if X == 0:
                n += 1
            X= X + k*50

        X = X + j*100

    X = X + i*500

print(n)
# Judge status: Accepted
import math
total_time = 0
los_ari = False
min_los = 9

for i in range(5):
  T=int(input())
  total_time = total_time + 10 * math.ceil(T/10)
  if T%10!=0:
    los_ari = True
    if T%10<min_los:
      min_los = T%10
      
if los_ari:
  total_time = total_time - (10-min_los)
print('{:.0f}'.format(total_time))
# Judge status: Accepted
S = input()
ans = 0
r = [0] * 2019
r[0] = 1
t = 0
base = 1
for c in S[::-1]:
    t = (t + base * int(c)) % 2019
    base = (base * 10) % 2019
    r[t] += 1

for k in r:
    ans += k * (k - 1) // 2

print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline

def main():
    n = int(input())

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

    total = sum(stick)
    mid = total // 2

    cum = 0
    midi = 0
    for i, block in enumerate(stick):
        cum += block
        if cum >= mid:
            midi = i
            break

    l1 = cum
    r1 = total - l1
    diff1 = abs(l1 - r1)
    
    l2 = l1 - stick[midi]
    r2 = r1 + stick[midi]
    diff2 = abs(l2 - r2)
    
    print(min(diff1, diff2))

main()
# Judge status: Wrong Answer
print("".join(map(str,input().split())))
# Judge status: Accepted
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())


if B > A:
    if A - B + (V - W) * T >= 0:
        print("YES")
    else:
        print("NO")
else:
    if B - A + (V - W) * T >= 0:
        print("YES")
    else:
        print("NO")
# Judge status: Accepted
s=input()
s=int(s.replace("/",""))
print(["Heisei","TBD"][s>20190430])
# Judge status: Wrong Answer
print('2018/01' + input()[-2:])
# Judge status: Wrong Answer
a,b,c=map(str,input().split())
print('A'+b[0].lower()+'C')
# Judge status: Accepted
N, D = map(int, input().split())

X = []
for n in range(N):
  X.append(list(map(int, input().split())))
cnt = 0

for i in range(N - 1):
  for j in range(i + 1, N):
    sum = 0
    for d in range(D):
      sum += (X[i][d] - X[j][d]) ** 2
    if (sum ** (1/2)) % 1 == 0:
      cnt += 1
print(cnt)
# Judge status: Accepted
S = (list(input()))
if S[0] == "7" or S[1] == "7" or S[2] == "7":
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import numpy as np

N=int(input())
A=np.array(list(map(int, input().split())))
S=sum(A)
X=A[0]
ans=abs(S-X)
for i in range(1,N-1):
  X+=A[i]
  ans=min(ans,abs(S-X))
print(ans)
# Judge status: Accepted
a, b, c, d = map(int, input().split())

ans = [a*c, a*d, b*c, b*d]

print(max(ans))
# Judge status: Accepted
from collections import deque
n = int(input())
v = deque(sorted(list(map(int, input().split()))))
for i in range(n-1):
    v1 = v.popleft()
    v2 = v.popleft()
    v.appendleft((v1+v2)/2)
print(v[0])
# Judge status: Accepted
n = int(input())
TXY = [(0, 0, 0)]
for i in range(n):
	TXY.append(tuple(map(int, input().split())))
for (t1, x1, y1), (t2, x2, y2) in zip(TXY, TXY[1:]):
	dist = abs(x2 - x1) + abs(y2 - y1)
	d = t2 - t1
	flag = False
	for t in range(d, -1, -2):
		if t == dist:
			flag = True
			break
	if flag == False:
		print("No")
		exit()
else:
	print("Yes")
# Judge status: Accepted
L, R, D = map(int, input().split())

ans = 0
for i in range(L, R + 1):
    if (i % D) == 0:
        ans += 1

print (ans)
# Judge status: Accepted
A, B = map(int, input().split())

if A >= 13:
  print(B)
elif 6 <= A <= 12:
  print(int(B/2))
else:
  print(0)
# Judge status: Accepted
# from pprint import pprint
# import math
# import collections

s = input()
# n, k = map(int, input().split(' '))
# a = list(map(int, input().split(' ')))
# a = []
# for i in range(n):
#     a.append(int(input()))

if s == 'RRR':
    ans = 3
elif s in ('RRS', 'SRR'):
    ans = 2
elif s == 'SSS':
    ans = 0
else:
    ans = 1

print(ans)
# Judge status: Wrong Answer

a,b,c = map(int,input().split())

if a*10+b+c <= a+b*10+c:
    print(a+b*10+c)
else:
    print(a*10+b+c)
# Judge status: Accepted
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

if a == 0:
    print(a)
    exit()

# 整数除算
m = n // (a+b)

# あまり
amari = n % (a+b)

# まずはあまりを除いた青の数
blue_num = m * a

if a > amari:
    blue_num += amari
elif a <= amari:
    blue_num += a

print(blue_num)
# Judge status: Accepted
X=int(input())
deposit=100
year=0
while(deposit<X):
  deposit=int(deposit/100)+deposit
  year=year+1

print(year)
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

def main():
    s = input()
    ans = 0

    for i in range(len(s)//2):
        if s[i] != s[-(i+1)]:
            ans += 1

    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
A,B,C = map(int, input().split())

flag = False

for i in range(B):
    
    t = i*A%B
    
    if t == C: 
        flag = True
        

if flag == True:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n = int(input())
a = [int(x) for x in input().split()]
s = 0
for i in a:
    s ^= i
print(*[x ^ s for x in a])
# Judge status: Wrong Answer
a, b = map(int, input().split())

i = a + b

if i % 3 == 0:
    print("Possible")
else:
    print("Impossible")
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
count = [0 for i in range(n+1)]
tmp = 0
for i in a:
  if i > n:
    tmp+=1
  else:
    count[i] += 1
  
ans = 0
for i in range(n+1):
  if count[i] >= i:
    ans += count[i] - i
  else:
    ans+=count[i]
print(ans+tmp)
# Judge status: Accepted
'''
Sample Input 1

5
2 6 1 4 5
Sample Output 1

YES
'''
lens = int(input())
arrs = [int(x) for x in input().split()]
print(["NO", "YES"][len(arrs) == len(set(arrs))])
# Judge status: Wrong Answer
n, k  = [int(i) for i in input().split()]
nums = [int(i) for i in input().split()]

print(n//(k-1))
# Judge status: Accepted
N = int(input())

ans = 1
while True:
  ans *=2
  if ans> N:
    print(int(ans /2))
    break
# Judge status: Accepted
import math

def number(plist):
    a = 1
    memo = []
    while len(plist) > 0:
        p = plist.pop(0)
        memo.append(p)
        num = len(set(range(1, p)) - set(memo))
        a += math.factorial(len(plist)) * num
    return a

n = int(input())
plist = list(map(int, input().split()))
qlist = list(map(int, input().split()))

a = number(plist)
b = number(qlist)
print(int(math.fabs(a - b)))
# Judge status: Wrong Answer
n,m=map(int,input().split())
if m>=n:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
alphabetlist=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

N=int(input())
S=input()

dic={moji:0 for moji in alphabetlist}
for i in range(N):
    dic[S[i]]+=1

ans=1
mod=10**9+7
for moji in dic:
    ans*=dic[moji]+1
    ans%=mod

ans-=1
ans%=mod
print(ans)
# Judge status: Accepted
N = int(input())
X = list(map(int,input().split()))

m = 10 ** 6
for p in range(1,100):
    s = 0
    for i in range(N):
        s += (p-X[i])**2
    m = min(m,s)

print(m)
# Judge status: Accepted
a,b=map(int, input().split())
if (a+b)%2==0:
  print(int((a+b)/2))
else:
  print((a+b)//2+1)
# Judge status: Accepted
a,b,c=input().split()
print(c,a,b)
# Judge status: Accepted
s = input()
if(s == "Sunny"):
    print("Cloudy")
elif(s == "Cloudy"):
    print("Rainy")
elif(s == "Rainy"):
    print("Sunny")
# Judge status: Wrong Answer
a, b = map(int, input().split())
print((a + b) // 2)
# Judge status: Accepted
n = int(input())
lst = list(map(int, input().split()))
lst.sort()
count = []

i = 0
while i<n-1:
    if lst[i]==lst[i+1]:
        count.append(lst[i])
        i+=2
    else:
        i+=1

count.sort(reverse=True)
count.append(0)
count.append(0)

print(count[0]*count[1])
# Judge status: Accepted
N = int(input())
ans = 0
b = 0
for i in range(N):
    a = int(input())
    ans += (a + b) // 2
    if (a + b) % 2 == 1:
        if a > 0:
            b = 1
        else:
            b = 0
    else:
        b = 0
        
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
x = N + M
print(x * (x - 1) // 2 - N * M)
# Judge status: Wrong Answer
a, b, x = map(int, input().split())
if a > x:
    print('No')
elif a + b >= x:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
s = input()
l = len(s)
m = set()
for i in range(l):
  m.add(s[i])
m = len(list(m))
if l == m:
  print('yes')
else:
  print('no')
# Judge status: Accepted
s = input()
print(s + ('s' if s[-1] != 's' else 'es'))
# Judge status: Wrong Answer
import math
H = int(input())

count = 0
count = int(math.log2(H))

total = 0
total = (1 - (2**(count + 1)))/(1 - 2)
print(total)
# Judge status: Accepted
N, L = map(int, input().split())
s = sorted([input() for i in range(N)])
print(*s, sep="")
# Judge status: Wrong Answer
n,l = list(map(int,input().split()))

r = [l+i for i in range(n)]
min_r = 1000000000
for i in r:
    if min_r > abs(i):
        min_r = abs(i)
        ans = i
print(sum(r)-i)
# Judge status: Accepted
n,m,x,y = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = "War"
am = max(a)
bm = min(b)
for z in range(x+1,y+1):
    if am<z and bm>=z:
        ans = "No War"
        break
print(ans)
# Judge status: Wrong Answer
a,b = map(int,input().split())
s = input()

lst = s.split("-")
print(lst)
if len(lst[0]) == a and len(lst[1]) == b and len(lst) == 2:
    print("Yes")
else:
    print("no")
# Judge status: Wrong Answer
n,m = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
i = ar.index(1)
count = 0
am = 0
if n <= m:
    print(1)
    exit()
if i % (m - 1) == 0:
    count += i // (m - 1)
else:
    count += i // (m - 1) + 1
    am += i % (m - 1)
if (n - 1 - i) % (m - 1) == 0:
    count += (n - 1 - i) // (m - 1)
else:
    count += (n - 1 - i) // (m - 1) + 1
    am += (n - 1 - i) % (m - 1)
if am == m - 1:
    count -= 1
print(count)
# Judge status: Accepted
n,k=map(int, input().split())
print(-(-~-n//~-k))
# Judge status: Wrong Answer
n,k=map(int,input().split())
print("1" if n%k==0 else "1")
# Judge status: Accepted
S = input()
li = []
st = ''
for c in S:
    st += c
    if len(li) == 0:
        li.append(st)
        st = ''
    elif li[len(li) - 1] == st:
        continue
    else:
        li.append(st)
        st = ''
print(len(li))
# Judge status: Accepted
import math

a=int(input())
s=a/2
print(math.ceil(s))
# Judge status: Wrong Answer
n = int(input())
s = [input() for _ in range(n)]

ans = {}
for si in s:
    if si in ans:
        ans[si] += 1
    else:
        ans[si] = 0

max_cnt = ans[max(ans)]


ans = [t for t in ans.keys() if ans[t] == max_cnt]
for t in sorted(ans):
    print(t)
# Judge status: Accepted
from math import gcd
k = int(input())

ans = 0

for i in range(1, k+1):
    for j in range(1, k+1):
        for l in range(1, k+1):
            ans += gcd(gcd(i, j), l)

print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
if a + b >= c:
    print("No")
else:
    if (a + b - c) ** 2 > 4 * a * b:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
if (a==b and c==a):
    if a!=b and b!=c:print('No')
else:print('Yes')
# Judge status: Wrong Answer
N = int(input())
H = list(map(int, input().split()))
 
a, b = 0, 0
for i in range(N-1):
  if H[i] >= H[i+1]: b += 1
  else: 
    b = 0
    a = max(a, b)
print(a)
# Judge status: Accepted
n, a, b = map(int, input().split())

ans = (b-a)//2
if a%2 == b%2:
    print(ans)
else:
    if a-1 >= n-b:
        ans += n-b+1
        a = a+n-b+1
        b = n
        print(ans)
    elif n-b > a-1:
        ans += a
        b = b-a
        a = 1
        print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
import fractions
g=fractions.gcd(a,b)
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 set(a)
print(len(prime_factorize(g))+1)
# Judge status: Accepted
s = input()

acgt = 'ACGT'
res = cnt = 0
for i in s:
    if i in acgt:
        cnt += 1
    else:
        res = max(cnt, res)
        cnt = 0
res = max(cnt, res)
print(res)
# Judge status: Accepted
import fractions
from functools import reduce
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)    

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

print(gcd_list(a))
# Judge status: Accepted
L = list(map(int, input().split()))
L.sort()

ans = 0
ans += L[2]-L[1]
L[0] += L[2]-L[1]
L[1] = L[2]

if (L[2]-L[0])%2 == 0:
    ans += (L[2]-L[0])//2
else:
    ans += 1+(L[2]+1-L[0])//2

print(ans)
# Judge status: Wrong Answer
comp=753
s=input()
ans=1000000000
for i in range(7,0,-1):
  if s.count(str(i)):
    left = s.find(str(i))
    while left!=-1 and left<=len(s)-3:
      tmp = int(s[left:left+3])
      ans = min(ans, abs(comp-tmp))
      left = s.find(str(i),left+1)
    break
print(ans)
# Judge status: Wrong Answer
a = input()
b = input()
temp = a.split()
n = int(temp[0])
n -= 1
m = int(temp[1])



ai = b.split()

sum = 0

for i in range(m):
    sum += int(ai[i])

temp1 = n - sum
if n <= 0:
    print(-1)
else:
    print(temp1)
# Judge status: Wrong Answer
y,m,d = map(int,input().split('/'))

print("2018"+'/'+str(m)+'/'+str(d))