peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
a,b = map(int, raw_input().split())
print (a + b) % 24
# Judge status: Accepted
A,B,C = input().split()
A = int(A)
B = int(B)
C = int(C)

if A==B and B==C:
    print("No")
elif A==B:
    print("Yes")
elif B==C:
    print("Yes")
elif A==C:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import sys
import math

num = input().split()
A = int(num[0])
B = int(num[1])
if A<=12:
	B=B/2
	if A<=5:
		B=0
print(B)
# Judge status: Accepted
a, b, c= map(int, input().split())
if a + b >= c:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
import sys

p=10**9+7

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

if (x+y)%3!=0 or x>2*y or y>2*x:
    print(0)
    sys.exit()

a=(-x+2*y)//3
b=(2*x-y)//3

A=1
for i in range(1,a+1):
    A=A*i
    A=A%p
B=1
for i in range(1,b+1):
    B=B*i
    B=B%p

AB=1
for i in range(1,a+b+1):
    AB=AB*i
    AB=AB%p

C=(AB*pow(A,p-2,p)*pow(B,p-2,p))%p

print(C)
# Judge status: Accepted
a,b = list(map(int, input().split()))

for x in range(0, 101):
  for y in range(0, 101):
    if(x == 0 and y == 0):
      continue
    if(x + y == a and 2*x + 4*y == b):
      print("Yes")
      exit()
print("No")
# Judge status: Accepted
N = int(input())
A = str(N - 1)
B = '1'
ans = 10 ** 9
for i in range(1, (N // 2) + 1):
    tmpa = list(map(int, A))
    tmpb = list(map(int, B))
    tmp = sum(tmpa) + sum(tmpb)
    ans = min(ans, tmp)
    A = str(N - i - 1)
    B = str(i + 1)

print(ans)
# Judge status: Accepted
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
Vf = V - W
D = abs(A - B)
Df = D - Vf * T
if Df <= 0:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n=int(input())
s=[input() for i in range(n)]
from collections import Counter
c=Counter(s)
c=list(c.most_common())

m=0
ans=[]
for k,v in c:
  if v>=m:
    ans.append(k)
    m=v
ans.sort()
print(*ans,sep='\n')
# Judge status: Accepted
from itertools import combinations
a2e = [int(input()) for i in range(5)]
k = int(input())

com = list(combinations(list(range(5)), 2))
ans = "Yay!"
for i in com:
    if abs(a2e[i[0]] - a2e[i[1]]) > k:
        ans = ":("
        break

print(ans)
# Judge status: Wrong Answer
a = int(input(">> "))

def calc(a):
	step2 = a**2
	step3 = a**3	
	return int(a+step2+step3)

print(calc(a))
# Judge status: Accepted
l, r = map(int, input().split())
if r-l >= 2019:
    print(0)
else:
    ans = 2019
    for i in range(l, r):
        for j in range(l+1, r+1):
            ans = min(ans, (i*j)%2019)

    print(ans)
# Judge status: Accepted
N = int(input())
V = list(map(int, input().split()))
if N == 2:
    print((V[0]+ V[1])/2)
else:
    V.sort()
    kati = V[0]
    for i in range(1, N):
        kati = (kati + V[i]) / 2
    print(kati)
# Judge status: Accepted

import sys
sys.setrecursionlimit(1000000)

n = int(input())


def calc(n, p):
    if n < p:
        return 0
    else:
        return n//p + calc(n//p, p)


if n % 2 == 1:
    print(0)
    sys.exit()

'''
ans = 0
n = n // 2
while(n>0):
    ans += n//5
    n = n//5
print(ans)
'''

print(calc(n//2, 5))
# Judge status: Accepted
a, b, x = map(int, input().split())
if a != 0:
    print(b // x - (a - 1) // x)
else:
    print(b // x + 1)
# Judge status: Wrong Answer
s, t = input().split()
a, b = map(int, input().split())
u = input()

if s == t:
    a -= 1
else:
    b -= 1

print(a, b)
# Judge status: Wrong Answer
s = list(input())
k = int(input())

for i in range(len(s)):
    cost = ord('z') - ord(s[i]) + 1
    c = s[i]
    if cost <= k:
        k -= cost
        c = 'a'
    s[i] = c
k %= 26
if k > 0:
    c = chr(ord(s[i]) + k)
    if ord(c) > ord('z'):
        c = chr(ord('a') + (ord(c) - ord('z') - 1))
    s[i] = c
print("".join(s))
# Judge status: Accepted
import collections
a,b,k = map(int,input().split())
n = b-a +1
if n < 2*k :
    for i in range(a,b+1):
    	print(i)
else :
    for i in range(a,a+k):
        print(i)
    for j in range(b+1-k,b+1):
        print(j)
# Judge status: Accepted
n, *d = map(int, open(0))
bn = min(d)
print((n+bn-1)//bn+4)
# Judge status: Wrong Answer
A, B = map(int, input().split())
if A == B:
    print("Draw")
elif A == 1 and B != 1:
    print("Alice")
elif B == 1 and A != 1:
    print("Bod")
elif A > B:
    print("Alice")
else:
    print("Bob")
# Judge status: Wrong Answer
A=[0];S,F=0,1
for c,s,f in [map(int,input().split())for _ in "_"*(int(input())-1)][::-1]:A.append(A[-1]-(-max(s+c-S,0)//F)*F if S>0 else s+c);S,F=max(s,S),f
for a in A[::-1]:print(a)
# Judge status: Accepted
n = int(input())

n %= 10
if n == 3:
    print('bon')
elif n == 0 or n == 1 or n == 6 or n == 8:
    print('pon')
else:
    print('hon')
# Judge status: Accepted
a,s,c = input().split()
print("A"+s[0]+"C")
# Judge status: Accepted
x = int(input())

def is_prime(x):
    i = 2
    while i**2 <=x:
        if x % i ==0:
            return False
        i +=1

    return True
  
while is_prime(x)==False:
  x +=1
    
print(x)
# Judge status: Accepted
A, B, C, K = map(int, input().split())

# 1 2 3 4

s = 0
if A < K:
    s += A
    if A + B < K:
        s += (K - (A + B)) * -1
else:
    s += K

print(s)
# Judge status: Accepted
N = int(input())
L = [list(map(int, input().split())) for _ in range(N)]
L_1 = [l[0]+l[1] for l in L]
L_2 = [(10**9+1-l[0])+l[1] for l in L]
L_3 = [(10**9+1-l[1])+l[0] for l in L]
L_4 = [(10**9+1-l[0])+(10**9+1-l[1]) for l in L]
L_1.sort()
a = L_1[-1]-L_1[0]
L_2.sort()
b = L_2[-1]-L_2[0]
L_3.sort()
c = L_3[-1]-L_3[0]
L_4.sort()
d = L_4[-1]-L_4[0]
print(max(a,b,c,d))
# Judge status: Wrong Answer
a,b,c = map(int,input().split())

if abs(b-a) == abs(c-b):
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
N=int(input())
ans=1
for i in range(N):
    if i*i<=N:
        ans=i
    else:
        break
print(ans**2)
# Judge status: Wrong Answer
n,k=map(int,input().split())
L=sorted([int(input()) for _ in range(n)])
print(min(L[-1]-L[-k], L[k-1]-L[0]))
# Judge status: Accepted
a,b = input().split()
print(b+a)
# Judge status: Wrong Answer
c_1=input()
c_2=input()
if c_1 == c_2[::-1]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
from functools import reduce

def main():
    n, a, b = map(int,input().split())
    mod = 10 ** 9 + 7
    def f(k):
        num = reduce(lambda x,y: x * y % mod, range(n, n-k, -1))
        den = reduce(lambda x,y: x * y % mod, range(1, k+1))
        return num * pow(den, mod-2, mod) % mod
    ans = pow(2,n,mod) - f(a) - f(b) - 1
    ans %= mod
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
N, P = map(int, input().split())
a_li = list(map(int, input().split()))
ans = 0
o = 0
for a in a_li:
    if a % 2 != 0:
        o += 1
if o == 0:
    if P == 1:
        ans = 0
    else:
        ans = 2 ** N
else:
    ans = 2 ** (N - 1)
print(ans)
# Judge status: Accepted
#!/usr/bin/env python3
n = int(input())
h = list(map(int, input().split()))

m = 0
flag = True

for i in h:
  if m > i + 1:
    flag = False
    break

  if i > m:
    m = i

print('Yes' if flag else 'No')
# Judge status: Accepted
N = int(input())
A = [int(a) for a in input().split()]

maximum = 0
minimum = 0
used = [0]*9
for i in A:
    i //= 400
    if i >= 8:
        maximum += 1
    elif used[i] == 0:
        maximum += 1
        minimum += 1
        used[i] = 1
if minimum == 0:
    minimum += 1
print(minimum, maximum)
# Judge status: Accepted
a,b=map(int,input().split())
if a <= 8 and b <= 8:
  print('Yay!')
else:
  print(':(')
# Judge status: Accepted
n = int(input())
*A, = map(int, input().split())
ans = 1000
for i in range(n - 1):
    ans += (ans // A[i]) * max(A[i + 1] - A[i], 0)
print(ans)
# Judge status: Accepted
x = int(input())
gohyaku = x//500
amari = x-500*gohyaku
goen = amari//5
happy = gohyaku*1000 + goen*5
print(happy)
# Judge status: Accepted
N,M = map(int,input().split())
a_list=[]
pass_1= []
for i in range(M):
    a = list(map(int,input().split()))
    if(a[0]==1):
        pass_1.append(a[1])
    elif(a[1]==N):
        a_list.append(a[0])
    
if list(set(pass_1) & set(a_list)):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')
# Judge status: Accepted
a,b,x = map(int,input().split())

B = b//x
A = (a-1)//x

print(B-A)
# Judge status: Accepted
import sys
S = input()
B = [False] * 26
for s in S:
    if B[ord(s) - ord('a')]:
        print('no')
        sys.exit()
    else:
        B[ord(s) - ord('a')] = True
print('yes')
# Judge status: Accepted
import numpy as np
cookies = np.array([int(x) for x in input().split()])

if any(cookies%2):
  ans = 0
elif cookies[0] == cookies[1] == cookies[2]:
  ans = -1
else:
  ans = 0
  while True:
    if not any(cookies%2):
      cookies = cookies//2
      ans += 1
      continue
    if all(cookies%2):
      ans += 1
    break
print(ans)
# Judge status: Accepted
k,x=map(int,input().split())
ans1=x-k+1
ans2=x+k
ans3=[x for x in range(ans1,ans2)]
print(*ans3)
# Judge status: Accepted
A, B, C, D = map(int, input().split())
print(max(min(B, D) - max(A, C), 0))
# Judge status: Accepted
n,l = map(int,input().split())

if l <= 0 <= n+l-1:
  print((n+l)*(n+l-1)//2 - (-l)*(-l+1)//2)
elif n+l-1 < 0:
  print((n-1)*(n+2*l-2)//2)
else:
  print((n-1)*(n+2*l)//2)
# Judge status: Wrong Answer
from collections import defaultdict

N ,M = map(int,input().split())
H = list(map(int,input().split()))
graph = defaultdict(set)
for _ in range(M-1):
    A, B = map(int,input().split())
    graph[A].add(B)
    graph[B].add(A)

cnt = 0
for i in range(1,N+1):
    t = H[i-1]
    flg = 0
    if all([H[j-1] < t for j in graph[i]]):
        cnt += 1
print(cnt)
# Judge status: Accepted
n,k = map(int,input().split())
d = input().split()
x = n-1
while True:
	x += 1
	s = str(x)
	f = 0
	for t in d:
		if t in s:
			f = 1
	if f == 0:
		print(x)
		break
# Judge status: Accepted
N,M = map(int,input().split())
t = [[0] for _ in range(M+1)]
for _ in range(N):
    a,b = map(int,input().split())
    if a<=M:
        t[a].append(b)
import heapq
A=[-i for i in t[1]]
heapq.heapify(A)
ans = 0
for i in range(1,M+1):
    maxi = heapq.heappop(A)
    ans -= maxi
    if i+1<=M:
        for k in t[i+1]:
            heapq.heappush(A,-k)
print(ans)
# Judge status: Wrong Answer
N, K = map(int, input().split())
if 0 <= N <= 10^18 and 1 <= K <= 10^18:
    if N>K:
        N = abs(N-K)
        N = abs(N-K)
        print(N)
    else:
        print(N)
else:
    print("0")
# Judge status: Accepted
N, A, B = list(map(int, input().split()))
ans = 0
for n in range(1, N+1):
    s = str(n)
    acc = 0
    for c in s:
        acc += int(c)
    if A <= acc <= B:
        ans += n
print(ans)
# Judge status: Accepted
S=input()
S = set(S.replace("hi","*"))
if S == set("*"):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import math
n, d = map(int, input().split())

x = []
for _ in range(n):
    x.append(list(map(int, input().split())))

count = 0
for i in range(n):
    for j in range(i+1, n):
        s = 0
        for k in range(d):
            diff = x[i][k]-x[j][k]
            s += diff * diff
        sq = math.sqrt(s) 
        if sq == int(sq):
            count += 1
print(count)
# Judge status: Accepted
K = int(input())
if K % 2 == 0 or K % 5 == 0:
    print(-1)
    exit()
m = 7 % K
cnt = 1
d = 10 % K
while True:
    if m == 0:
        break
    cnt += 1
    m = (m+7*d)%K
    d = d*10%K
print(cnt)
# Judge status: Wrong Answer
n, h = map(int, input().split())
a, b = [], []
for _ in range(n):
    s, t = map(int, input().split())
    a.append(s)
    b.append(t)
m = max(a)
b.sort()
ans, c = 0, 0
while b:
    l = b.pop()
    if l >= m and c <= h:
        ans += 1
        c += l
    else:
        break
if len(b) == 0 or l < m:
    ans += max(h - c, 0) // m
    if max(h - c, 0) % m != 0:
        ans += 1
print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
ans = "Odd"
if(a*b%2==0):
	ans = "Even"
print(ans)
# Judge status: Wrong Answer
n,ans = int(input()),0
for i in range(n):
    if ans+i<=n:
        ans+=i
    else:
        break
if ans==n:
    for j in range(i-1):
        print(j+1)
else:
    for j in range(i-2):
        print(j+1)
    print(n-ans+i-1)
# Judge status: Wrong Answer

n = int(input())
arr = list(map(int , input().split()))
if arr[0] > 0 or arr[-1] == 0:
	print("-1")
else:
	f = 1
	possible = 2
	ans = 1
	for i in range(1,n+1):
		#print(possible, ans)
		if arr[i] > possible:
			print(-1)
			f = 0
			break
		ans+=possible
		#if i == n:
		#	break
		possible-=arr[i]
		possible = 2*possible
	if f: print(ans)
# Judge status: Accepted
s = input()
S="2018"
S+=s[4:]
print(S)
# Judge status: Accepted
x = list(map(int, input().split()))

print(x.index(0) + 1)
# Judge status: Accepted
def main():
  n = int(input())
  
  dp = [0]*(n+1)
  dp[0] = 1
  mod = pow(10, 9) + 7
  for i in range(3, n+1):
    dp[i] = dp[i-1] + dp[i-3]
    dp[i] %= mod
  
  print(dp[n])

if __name__ == "__main__":
  main()
# Judge status: Accepted
S = input()

if(S == "ABC"):
    print("ARC")
else:
    print("ABC")
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))

wari = [0]*3

for a in A:
    if a % 4 == 0:
        wari[2] += 1
    elif a % 2 == 0:
        wari[1] += 1
    elif a % 2 == 1:
        wari[0] += 1

if wari[1] == 0:
    if wari[2] + 1 >= wari[0]:
        print("Yes")
    else:
        print("No")

else:
    if wari[2] >= wari[0]:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
N = int(input())
x = N
if(N%2==1):
  print(0)
else:
  ans = 0
  num = 1
  while( x//(5**num) > 1 ):
    #print(ans,(x//(5**num)//2) )
    ans += ( (x//(5**num)) // 2)
    num += 1
  print(ans)
# Judge status: Accepted
N,K = map(int,input().split())
H = sorted(list(map(int,input().split())),reverse = True)
print(sum(H[K:]))
# Judge status: Accepted
K,S = map(int,input().split())


ans = 0

for i in range(K+1):
    for j in range(K+1):
        z = S - i - j
        if 0 <= z <= K:
            ans += 1

print(ans)
# Judge status: Wrong Answer
k,x=map(int,input().split())
for i in range(x-k+1,x+k):
  print("i",end=" ")
print()
# Judge status: Accepted
a,b,c,d=input()
for i in range(2**3):
    ls=['+','+','+']
    for j in range(len(ls)):
        if (i>>j)&1:
            ls[j]='-'
    if eval(a+ls[0]+b+ls[1]+c+ls[2]+d) == 7:
        print(a+ls[0]+b+ls[1]+c+ls[2]+d+"=7")
        break
# Judge status: Accepted
l=input().split()
s=''.join(l)
s=int(s)
print('YES' if s%4==0 else 'NO')
# Judge status: Accepted
a,b,c,d = input()

if a==b==c or b==c==d:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N = int(input())

sumans = 0
for count in range(1,N+1):
    if len(str(count))%2 == 1:
        sumans +=1

print(sumans)
# Judge status: Wrong Answer
h,w = map(int,input().split())
if (h*w)%2 == 0:
  print((h*w)//2)
else:
  print(((h*w)//2)+1)
# Judge status: Accepted
n = int(input())
ans = 0
ans += 2*(n // 11)
n %= 11
if n >= 7:
    print(ans+2)
elif n >= 1:
    print(ans+1)
else:
    print(ans)
# Judge status: Accepted
n,m=map(int,input().split())
if 2*n>=m:
    print(m//2)
else:
    k1 = (m-n*2)//4
    k2 = k1+1
    k3 = max(k1-1,0)
    r1 = min(n+k1,(m-k1*2)//2)
    r2 = min(n+k2,(m-k2*2)//2)
    r3 = min(n+k3,(m-k3*2)//2)
    print(max(r1,r2,r3))
# Judge status: Accepted
n = int(input())
a = [0] * n
b = [0] * n
for i in range(n):
  p, q = [int(j) for j in input().split(' ')]
  a[i] = p+q
  b[i] = p-q

a.sort()
b.sort()
print(max(a[-1] - a[0], b[-1] - b[0]))
# Judge status: Accepted
from collections import Counter
N = int(input())
C = Counter([int(input()) for _ in range(N)])
print(len(list(filter(lambda x: x % 2 == 1, list(C.values())))))
# Judge status: Wrong Answer
S = list(input())
print(S)
S_after = []
for i in S:
    if i == '1':
        S_after.append('1')
    elif i == '0':
        S_after.append('0')
    elif i == 'B':
        if S_after == []:
            pass
        else:
            S_after.pop()
print(''.join(S_after))
# Judge status: Accepted

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
# print('T:',T)

if N==1:
    f2 = T[0]

elif N==2:
    import math
    a,b = T[0], T[1]
    f=math.gcd(a,b)
    f2=a*b//f

else:
    import math
    a,b = T[0], T[1]
    f=math.gcd(a,b)
    f2=a*b//f
    for i in range(2,N):
        a,b=f2, T[i]
        f=math.gcd(a,b)
        f2=a*b//f

print(f2)
# Judge status: Accepted
x,n=map(int,input().split())
l=list(map(int,input().split()))
a=0
for i in range(100):
    if x-i not in l:
        ans=x-i
        a=i+1
        break
for i in range(100):
    if x+i not in l:
        ansb=x+i
        ab=i+1
        break
if a>ab:
    print(ansb)
else:
    print(ans)
# Judge status: Accepted
x = int(input())
ans = 0
if x % 11 == 0:
    print(2 * (x // 11))
else:
    if x % 11 <= 6:
        print(2 * (x // 11) + 1)
    else:
        print(2 * (x // 11) + 2)
# Judge status: Accepted
n, m = [int(x) for x in input().split()]
f_set = set()
t_set = set()
for _ in range(m):
    a, b = [int(x) for x in input().split()]
    if a == 1:
        f_set.add(b)
    elif b == n:
        t_set.add(a)
print("POSSIBLE" if len(f_set & t_set) >= 1 else "IMPOSSIBLE")
# Judge status: Accepted
n=int(input())
s=list(input())
mod=10**9+7
from collections import Counter
c=Counter(s)
ans=1
for k in c.keys():
    ans*=(c[k]+1)%mod
    ans%=mod
print((ans+mod-1)%mod)
# Judge status: Wrong Answer
def main():
 n = list(map(int,input().split()))
 print(max(n[0] + n[1] * 10 + n[2], n[0] * 10 + n[1] + n[2]))

main()
# Judge status: Accepted
S = str(input())
T = str(input())

if T.startswith(S) ==True:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import sys 
N = list(map(int, sys.stdin))
bot = N[1]
for i in range(N[0]):
  if bot == 2:
    print(i)
    break
  bot == N[bot]
else:
  print(-1)
# Judge status: Accepted
n,k = map(int,input().split())
h = list(map(int,input().split()))

dp = [10**10]*n
dp[0] = 0

for i in range(n-1):
    for j in range(i+1,min(i+k,n-1)+1):
        dp[j] = min(dp[j],dp[i]+abs(h[j]-h[i]))
        # print(dp)
print(dp[n-1])
# Judge status: Wrong Answer
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n, x = map(int, input().split())
    l = tuple(map(int, input().split()))

    d = 0
    for i in range(1, n):
        d += l[i-1]
        if d >= x:
            print(i)
            quit()
    else:
        print(n)

if __name__ == '__main__':
    main()
# Judge status: Accepted
x=int(input())
[i**5-x-j**5or print(i,j)+exit()for i in range(200)for j in range(-i,i)]
# Judge status: Accepted
N = int(input())
if N%2 == 0:
    print(int(N/2))
else:
    print(int(N//2) + 1)
# Judge status: Accepted
import sys
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし

S = LI2()

a = 10*S[0]+S[1]
b = 10*S[2]+S[3]

if 1 <= a <= 12 and 1 <= b <= 12:
    print('AMBIGUOUS')
elif not 1 <= a <= 12:
    if 1 <= b <= 12:
        print('YYMM')
    else:
        print('NA')
else:
    print('MMYY')
# Judge status: Accepted
a, b, c, k = list(map(int, input().split()))

if a>=k:
    print(k)
elif a<k<=(a+b):
    print(a)
else:
    print(a-(k-a-b))
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

l = []
d = dict()
for v in a:
    if v not in d:
        d[v] = 1
    else:
        d[v] += 1
        
    if d[v] == 2 or d[v] == 4:
        l.append(v)

if len(l) < 2:
    print(0)
else:
    l.sort()
    print(l[-1] * l[-2])
# Judge status: Accepted
n=int(input())
H=list(map(int,input().split()))
c=0
C=[]

    

for i in range(n-1):
    if H[i]>=H[i+1]:
        c+=1
    else:
        C.append(c)
        c=0
    if i==n-2:
        C.append(c)
if len(H)!=1:        
    ans=max(C)
else:
    ans=0

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    print((N*(N+1))//2)

main()
# Judge status: Wrong Answer
from collections import defaultdict

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

s = readChar()
b="-1"
ans=0
while len(s)>1:
	if b!=s[:1]:
		b=s[:1]
		s=s[1:]
		ans+=1
	else:
		b=s[:2]
		s=s[2:]
		ans+=1
if b!=s:
	ans+=1

print(ans)
# Judge status: Accepted
A, B, C = map(int, input().split())
num = [A, B, C]
cnt =0

for i in range(2):
    multi = (max(num)-min(num))//2
    num[num.index(min(num))] += 2*multi
    cnt += multi

if len([i for i in num if i==max(num)]) ==1:
    cnt += 1
elif len([i for i in num if i==max(num)]) ==2:
    cnt += 2
print(cnt)
# Judge status: Accepted
N, K = map(int, input().split())
H = sorted(list(map(int, input().split())))
print(sum([0] + H[:-K]) if K > 0 else sum(H))
# Judge status: Wrong Answer
n,m = map(int,input().split())
li = [list(map(int,input().split()))for i in range(n)]

li.sort()
n = 0
ans = 0
for i in range(n):
    a = min(m,li[i][1])
    m-=a
    ans += li[i][0]*a
    if a ==0:
        break
print(ans)
# Judge status: Accepted
import heapq
n, m = map(int, input().split())
*a, = map(lambda x: -x, map(int, input().split()))

heapq.heapify(a)
for i in range(m):
    _a = int(heapq.heappop(a)/2)
    heapq.heappush(a, _a)

print(sum(a)*-1)
# Judge status: Accepted
w, a, b = map(int, input().split())

if a <= b:
  print(max(0, b-(a+w)))
else:
  print(max(0, a-(b+w)))
# Judge status: Wrong Answer
O=input()
E=input()
print(*[O+E for O,E in zip(O,E)],sep="")
# Judge status: Wrong Answer
n,k=map(int,input().split())
h=[]
ma=10**9
for i in range(n):
  a=int(input())
  h.append(a)
h.sort()

for i in range(n-k+1):
  sa=h[n-k+1]-h[i]
  if sa<ma:
    ma=sa
    
print(ma)
# Judge status: Wrong Answer
s=input().split()
a=int(s[0])
b=float(s[1])
print(a*int(b*100)//100)
# Judge status: Accepted
#!/usr/bin/env python3
n, m = map(int, input().split())
a = max(n, m)
b = min(n, m)
if b == 1:
    print((a - 2) if a > 1 else 1)
elif b == 2:
    print(0)
else:
    print((a - 2) * (b - 2))
# Judge status: Accepted
N,M=list(map(int,input().split()))
s=set();t=set();
for i in range(M):
  a,b=list(map(int,input().split()))
  if(a==1):
    s.add(b)
  if(b==N):
    t.add(a)
print("POSSIBLE"if s&t else"IMPOSSIBLE")
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
frag=1
frag2=1
for i in range(n-1):
  if a[i]-a[i+1]==1:
    if frag2==1 and frag==1:
      frag2=0
    elif frag2==0:
      frag=0
      break
    elif frag==2:
      frag=0
      break
  elif a[i]-a[i+1]>1:
    frag=0
    break
  elif a[i]==a[i+1]:
    frag=2
  elif frag==2:
    frag=1
if frag!=0:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
s = input()
s = set(s)

if s==set('WE') or s==set('SN') or s==set('SNWE'):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a,b,n = map(int, input().split())


if n >= b-1:
  print( (a*(b-1)) // b - a * ((b-1)//b))

else:
  print( (a*n) // b - a * (n//b))
# Judge status: Accepted
a=set(map(int,input().split()))
print(len(a))
# Judge status: Wrong Answer
a = int(input())
print(1 / 2 if a % 2 == 0 else (a + 1) / 2)
# Judge status: Accepted
a1_list = list(map(int, input().split()))
a2_list = list(map(int, input().split()))
a3_list = list(map(int, input().split()))
a1_list.extend(a2_list)
a1_list.extend(a3_list)

n = int(input())
nums = []
for _ in range(n):
  x = int(input())
  nums.append(x)
  
result = "No"
patterns = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]]
for p in patterns:
  if a1_list[p[0]] in nums and a1_list[p[1]] in nums and a1_list[p[2]] in nums:
    result = "Yes"
    break
print(result)
# Judge status: Wrong Answer
a, b, k = map(int , input().split())

#もし高橋君がクッキーを 1 枚以上持っているなら、高橋君のクッキーを 1 枚食べる。
#そうでなく、もし青木君がクッキーを 1 枚以上持っているなら、青木君のクッキーを 1 枚食べる。
#高橋君も青木君もクッキーを持っていないなら、何もしない。

if k >= a:
  k = k - a
  a = 0
else:
  a = a - k
  k = 0

if k >= b:
  b = k - b
else:
  b = b - k

print(a, b)
# Judge status: Wrong Answer
N = int( input() )
D = list ( int(x) for x in input().split() )

Ds = [ 0 for i in range( max(D) + 1 ) ]

for i in range( N ):
    Ds[ D[i] ] += 1

ans = 1

if Ds[ 0 ] != 1:
    ans = 0
else:
    for i in range( 1 , max(D) + 1 ):
        ans *= Ds[ i-1 ] ** Ds[i]

        if ans == 0:
            break
print( ans )