Harryxun/stf_run huggingface dataset:
#C - Otoshidama
N, Y = map(int, input().split())

x_ans = -1
y_ans = -1
z_ans = -1
flg = 0

for x in range(N+1):
    for y in range(N+1-x):
        otoshidama = 10000*x + 5000*y + 1000*(N-x-z)
        if otoshidama == Y :
            flg = 1
            x_ans = x
            y_ans = y
            z_ans = z
print(x_ans, y_ans, z_ans)
                
    

### FIXED CODE ###

#C - Otoshidama
N, Y = map(int, input().split())

x_ans = -1
y_ans = -1
z_ans = -1
flg = 0

for x in range(N+1):
    for y in range(N+1-x):
        otoshidama = 10000*x + 5000*y + 1000*(N-x-y)
        if otoshidama == Y :
            flg = 1
            x_ans = x
            y_ans = y
            z_ans = N-x-y
print(x_ans, y_ans, z_ans)
from math import gcd

A, B, C, D = map(int, open(0).read().split())
k = (C*D)//gcd(C,D)

def calc(x):
    q = (x//C)+(x//D)-(x//k)
    return x-q

print(calc(B) - calc(A-1))

### FIXED CODE ###

from fractions import gcd

A, B, C, D = map(int, open(0).read().split())
k = (C*D)//gcd(C,D)

def calc(x):
    q = (x//C)+(x//D)-(x//k)
    return x-q

print(calc(B) - calc(A-1))
a,b = map(int,input().split())
f = 0
for i in range(a+1):
    if f == 1: break
    for j in range(a+1-i):
        if f == 1: break
        k = a+1-i-k
        if (i*10000 + j*5000 + k*1000) == b:
                f = 1
                print(i,j,k)
if f == 0: print(-1,-1,-1)

### FIXED CODE ###

a,b = map(int,input().split())
f = 0
for i in range(a+1):
    if f == 1: break
    for j in range(a+1-i):
        if f == 1: break
        k = a-i-j
        if (i*10000 + j*5000 + k*1000) == b:
                f = 1
                print(i,j,k)
if f == 0: print(-1,-1,-1)
S = input()
K = int(input())
key = 1
i = 0
while True:
    if i > 100:
        break
    if int(S[i]) != 1:
        print(S[i])
        key = 1
        break
    i += 1

if key == 0:
    print(S[0])


### FIXED CODE ###

S = input()
K = int(input())
key = 0
i = 0
while True:
    if i >= K:
        break
    if i >= len(S):
        break
    if int(S[i]) != 1:
        print(S[i])
        key = 1
        break
    i += 1

if key == 0:
    print(S[0])
import sys
input = sys.stdin.readline
A, B, C = input().split()
if b - a == c - b:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

import sys
input = sys.stdin.readline
a, b, c = [int(x) for x in input().split()]
if b - a == c - b:
    print("YES")
else:
    print("NO")
N, M = map(int, input().split())
A = [-1*int(i) for i in input().split()]

# import heapq
# print(A)
heapq.heapify(A)
# print(A)
for _ in range(M):
    a = heapq.heappop(A)
#     print( "aaa",a)
    heapq.heappush(A,-1*((-1*a)//2))
#     print("AAA",A)
    
# print("list",A)

print(-1*sum(A))


### FIXED CODE ###

N, M = map(int, input().split())
A = [-1*int(i) for i in input().split()]

import heapq
# print(A)
heapq.heapify(A)
# print(A)
for _ in range(M):
    a = heapq.heappop(A)
#     print( "aaa",a)
    heapq.heappush(A,-1*((-1*a)//2))
#     print("AAA",A)
    
# print("list",A)

print(-1*sum(A))
N,M = map(int, input().split())

P = [list(map(int,input().split())) for i in range(M)]
s=[]
c=[]

for i in range(M):
    s.append(P[i][0])
    c.append(P[i][1])
A=[-1]*N

k=0
for i in range (M):
    if (A[s[i]-1]==-1) or (A[s[i]-1]==c[i]):
        A[s[i]-1]=c[i]
    else:
        k=1
        print(-1)
aa=0
if A[0]==0 and N>1:
    k=1
    print(-1)
if k==0:
    for i in range (M):
        if A[i]==-1:
            A[i] = 0
            if A[0]==0:
                A[0]=1

        aa+=A[i]*pow(10,(M-i-1))

    print(aa)

### FIXED CODE ###

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

P = [list(map(int,input().split())) for i in range(M)]
s=[]
c=[]

for i in range(M):
    s.append(P[i][0])
    c.append(P[i][1])
A=[-1]*N

k=0
for i in range (M):
    if (A[s[i]-1]==-1) or (A[s[i]-1]==c[i]):
        A[s[i]-1]=c[i]
    else:
        k=1
        print(-1)
aa=0
if A[0]==0 and N>1:
    k=1
    print(-1)
if M==0:
    k=1
    if N==1:
        print(0)
    else:
        print(pow(10,(N-1)))

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

        aa+=A[i]*pow(10,(N-i-1))

    print(aa)
from collections import deque

def pr(A,n):
    for i in range(n):
        if i!=n-1:
            print(A[i],end=" ")
        else:
            print(A[i])

n=int(input())
que_r=deque()


for i in range(n):
    s=input().split()

    if s[0]=="insert":
        que_r.appendleft(int(s[1]))
    elif s[0]=="delete":
        que_r.remove(int(s[1]))
    elif s[0]=="deleteFirst":
        gav=que_r.popleft()
    else:
        gav=que_r.pop()

pr(que_r,len(que_r))


### FIXED CODE ###

from collections import deque


n=int(input())
que_r=deque()

for i in range(n):
    s=input()
    l=len(s)
    if s[0]=="i":
        que_r.appendleft(s[7:])
    elif s[6]==" ":
        try:
            que_r.remove(s[7:])
        except: pass
    elif l>10:
        que_r.popleft()
    elif l>6:
        que_r.pop()

print(*que_r)
N = int(input())
s = set()
for i in range(N):
	a = map(int,input().split(' '))
	b = sorted(a)
	s.add(d)
print(N - len(s))

### FIXED CODE ###

N = int(input())
l = []
s = set()
for i in range(N):
	a,b,c = map(int,input().split(' '))
	l.append(a)
	l.append(b)
	l.append(c)
	l.sort()
	d = str(l[0])
	e = str(l[1])
	f = str(l[2])
	g = d + e + f
	s.add(g)
	l = []
print(N - len(s))
a, op, b = map(int, input().split())
print(a + b if op == + else a - b)

### FIXED CODE ###

a, op, b = map(str, input().split())
a = int(a)
b = int(b)
print(a + b if op == "+" else a - b)
n,k,s=map(int, input().split())
lis = [s]*k
if s==10**9:for i in range(n-k):lis.append(1)
else:for i in range(n-k):lis.append(s+1)
print(*lis)


### FIXED CODE ###

n,k,s=map(int, input().split())
lis = [s]*k
if s==10**9:
    for i in range(n-k):
        lis.append(1)
else:
    for i in range(n-k):
        lis.append(s+1)
print(*lis)
import sys
import numpy as np
#import math
#import itertools
#import re
#from functools import lru_cache
 
input = sys.stdin.readline
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
 
 
def main():
    n, m = list(map(int, input().split()))
    AB = [list(map(int, input().split())) for _ in range(m)]
    graph = [[] for _ in range(n)]
    for a, b in AB:
        graph[a-1].append(b)
        graph[b-1].append(a)
    dist = np.ones(n)
    dist *= -1
    dist[0] = 0
    queue = [[1]]
    while True:
        positions = queue.pop()
        for p in positions:
            queue_next = []
            for next in graph[p-1]:
                if dist[next-1] == -1:
                    dist[next-1] = p
                    queue_next.append(next)
        if len(queue_next) == 0:
            break
        queue.append(queue_next)
    if np.count_nonzero(dist == -1) > 0:
        print(c)
    else:
        print('Yes')
        for d in dist[1:]:
            print(int(d))
 
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import numpy as np
#import math
#import itertools
#import re
#from functools import lru_cache
from collections import deque

input = sys.stdin.readline
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline


def main():
    n, m = list(map(int, input().split()))
    AB = [list(map(int, input().split())) for _ in range(m)]
    graph = [[] for _ in range(n)]
    for a, b in AB:
        graph[a-1].append(b)
        graph[b-1].append(a)
    dist = np.ones(n)
    dist *= -1
    dist[0] = 0
    queue = deque([1])
    while queue:
        p = queue.popleft()
        for next in graph[p-1]:
            if dist[next-1] == -1:
                dist[next-1] = p
                queue.append(next)

    if np.count_nonzero(dist == -1) > 0:
        print('No')
    else:
        print('Yes')
        for d in dist[1:]:
            print(int(d))


if __name__ == '__main__':
    main()
N = int(input())
nums = list(map(int, input().split()))
n_dict = {}
idx = 0
mod = !(N%2)
while True:
  if 2*idx + mod > N:
    break
  else:
    n_dict[2*idx+mod] = 0
for num in nums:
  if num in n_dict:
    n_dict[num] += 1
  else:
    print(0)
    exit()
for key, value in n_dict.items():
  if value != 2:
    print(0)
    exit()
print((2**(N//2))%(10**9+7))

### FIXED CODE ###

N = int(input())
nums = list(map(int, input().split()))
n_dict = {}
idx = 0
mod = ((N%2)+1)%2
while True:
  if 2*idx + mod > N:
    break
  else:
    n_dict[2*idx+mod] = 0
  idx += 1
for num in nums:
  if num in n_dict:
    n_dict[num] += 1
  else:
    print(0)
    exit()
for key, value in n_dict.items():
  if value != 2 and key != 0:
    print(0)
    exit()
print((2**(N//2))%(10**9+7))
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
     print("NA")

### FIXED CODE ###

a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
     print("MMYY")
elif 0<under<13 and (1>over or over>12):
     print("YYMM")
else:
     print("NA")
x = input()
max1 = 1
for s in range(x):
  for t in range(x):
    if pow(s,t) > max1 and pow(s,t) <= x:
      max1 = pow(s,t)
print(max1)



### FIXED CODE ###

x = int(input())
max1 = 1
for s in range(x):
  for t in range(2,10):
    if pow(s,t) > max1 and pow(s,t) <= x:
      max1 = pow(s,t)
print(max1)
from bisect import bisect_left
N, M = map(int, input().split())
A = list(map(int, input().split()))
BC = [list(map(int,input().split())) for _ in range(M)]
BC = sorted(BC,key= lambda x: x[1],reverse=True)
A.sort()
bisec = bisect_left
ex = A.extend
su =0
for i in range(M):
    if BC[i][1]<=A[0]:
        break
    B= BC[i][0]
    C = BC[i][1]
    b = bisec(A,C)
    if B>=b:
        su += C*b
        A = [A[i] for i in range(b,len(A))]
    else:
        su += C*B
        A = [A[i] for i in range(B,len(A))]
print(sum(A)+su)


### FIXED CODE ###

N, M = map(int, input().split())
A = list(map(int, input().split()))
BC = [list(map(int,input().split())) for _ in range(M)]
BC = sorted(BC,key= lambda x: x[1],reverse=True)
A.sort()
n = 0
i = 0
m = 0
while A[i]<BC[n][1]:
    A[i] = BC[n][1]
    m = m+1
    if m >=BC[n][0]:
        m = 0
        n = n+1
    i += 1
    if n==M:
      break
    if i == N:
      break
print(sum(A))
n = int(input())
k = int(input())

if(n % k > 0):
    print(1)
else:
    print(0)


### FIXED CODE ###

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

if(n % k > 0):
    print(1)
else:
    print(0)
N=int(input())
a_list = list(map(int, input().split()))
lst = []
for i, a in enumerate(a_list):
    tmp = a_list[:i] + a_list[i+1:]
    lst.append(reduce(math.gcd, tmp))
print(max(lst))


### FIXED CODE ###

from fractions import gcd
N=int(input())
a_list = list(map(int, input().split()))
gcd_l = [0] * (N+1) 
gcd_r = [0] * (N+1) 
for i, a in enumerate(a_list):
    gcd_l[i+1] = gcd(gcd_l[i], a)
for i in range(N, 0, -1):
    a = a_list[i-1]
    gcd_r[i-1] = gcd(gcd_r[i], a)
ans = 1
# print(gcd_l, gcd_r)
for i in range(N):
    tmp = gcd(gcd_l[i], gcd_r[i+1])
    if (ans < tmp):
        ans = tmp
print(ans)
X,Y=map(int,input().split())

prize=0

if X==1:
    prize+=300000
    if Y==1:
        pprize+=700000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==2:
    prize+=200000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==3:
    prize+=100000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass

print(prize)

### FIXED CODE ###

X,Y=map(int,input().split())

prize=0

if X==1:
    prize+=300000
    if Y==1:
        prize+=700000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==2:
    prize+=200000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
elif X==3:
    prize+=100000
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass
else:
    if Y==1:
        prize+=300000
    elif Y==2:
        prize+=200000
    elif Y==3:
        prize+=100000
    else:
        pass

print(prize)
n, a, b = list(map(int, input().split()))
k = b - a
if k % 2 == 1:
    print(min(a-1, n-b)+1+(z-1)//2)
else:
    print(z//2)


### FIXED CODE ###

n, a, b = list(map(int, input().split()))
k = b - a
if k % 2 == 1:
    print(min(a-1, n-b)+1+(k-1)//2)
else:
    print(k//2)
import sys
N, M = map(int, input().split())

a_list = [0] * M

for m in range(M):
    a_list[m] = int(input())

for m in range(M - 1):
    if a_list[m] + 1 == a_list[m + 1]:
        print(0)
        sys.exit()
    else:
        continue

range_list = [i for i in range(1, N + 1)]
new_list = [0] * (M + 1)

new_list[0] = range_list[0: a_list[0] - 1]
new_list[M] = range_list[a_list[M - 1]:]

if M - 1 >= 1:
    for m in range(1, M):
        new_list[m] = range_list[a_list[m - 1]: a_list[m] - 1]

MOD = 1000000007

def fib(n):
    dp_list = [0] * n
    dp_list[0] = 1
    dp_list[1] = 2
    
    for i in range(2, n):
        dp_list[i] = dp_list[i - 1] + dp_list[i - 2]
    return dp_list[n - 1]

count = 1
for item in new_list:
    if not item:
        continue
    else:
        count *= (fib(len(item) - 1) % MOD)
        count %= MOD
print(count)

### FIXED CODE ###

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

MOD = 1000000007

def fib(n):
    dp_list = [0] * n
    dp_list[0] = 1
    if n == 1:
        return 1
    dp_list[1] = 2
    
    for i in range(2, n):
        dp_list[i] = dp_list[i - 1] + dp_list[i - 2]
    return dp_list[n - 1]

if M == 0:
    print(fib(N) % MOD)
    sys.exit()

a_list = [0] * M

for m in range(M):
    a_list[m] = int(input())

for m in range(M - 1):
    if a_list[m] + 1 == a_list[m + 1]:
        print(0)
        sys.exit()
    else:
        continue

range_list = [i for i in range(1, N + 1)]
new_list = [0] * (M + 1)


new_list[0] = [0] + range_list[0: a_list[0] - 1]
new_list[M] = range_list[a_list[M - 1]:]

if M - 1 >= 1:
    for m in range(1, M):
        new_list[m] = range_list[a_list[m - 1]: a_list[m] - 1]

count = 1
for item in new_list:
    if not item or len(item) == 1:
        continue
    else:
        count *= (fib(len(item) - 1) % MOD)
        count %= MOD
        #print(count)
print(count)
S, T = input().split()

if len(S) == len(T) - 1:
    Slis = list(S)
    Tlis = list(T)
    removedTlis = Tlis.remove(T[len(T) - 1])
    if Slis  == removedTlis:
        print("Yes")
    else:
        print("No")
else:
    print("No")

### FIXED CODE ###

S = input()
T = input()
 
Slis = list(S)
Tlis = list(T)
Tlis.pop(-1)
if len(S) == 0:
    print('No')
elif Slis  == Tlis:
    print('Yes')
else:
    print('No')
import math
from functools import reduce

N,X = map(int,input().split())
x=list(map(int,input().split()))

D=[]

for i in range(N):
    D.append(abs(X-x[i]))
    
def gcd(D):
    return reduce(math.gcd, D)
    
def gcd_list(numbers):
    return reduce(math.gcd, D)

print(gcd(D))


### FIXED CODE ###

N,X = map(int,input().split())
Z=list(map(int,input().split()))

D=[]

for i in range(N):
    D.append(abs(X-Z[i]))
    
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)
res = D[0]

for j in range(1, N):
    res = gcd(res, D[j])

print(res)
K,X = map(int, input().split())
for i in range(X-K+1,X+K):
  if i <= X+K-1:
    print(i, end="")
  else
    print(i)

### FIXED CODE ###

K,X = map(int, input().split())
for i in range(X-K+1,X+K):
  if i <= X+K-1:
    print(i, end=" ")
  else:
    print(i)
n = int(input())
a = list(map(int, input().split(' ')))
bucket = [0]*1000000001

distinct = True
for i in a:
    if bucket[i] != 0:
        distinct = False
        break
    bucket[i] += 1
    
if distinct:
    print("Yes")
else:
    print('No')

### FIXED CODE ###

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

distinct = True
for i in a:
    if i in m:
        distinct = False
        break
    m[i] = 1
    
if distinct:
    print("YES")
else:
    print('NO')
t=list(raw_input().lower())
c=[0 for i in range(26)]
for i in range(len(t)):
        c[ord(t[i])-ord(u"a")]+=1
for i in range(26):
        print chr(ord("a")+i),":",c[i]

### FIXED CODE ###

c=[0]*26
while 1:
        try:
                t=list(raw_input().lower())
                for i in range(len(t)):
                        if 0<=ord(t[i])-ord("a")<=25:
                                c[ord(t[i])-ord("a")]+=1
        except EOFError:
                break
for i in range(26):
        print chr(ord("a")+i),":",c[i]
s=list(input())

print(''.join(s[0:4]+' '+''.join(s[4:])

### FIXED CODE ###

s=list(input())

print(''.join(s[0:4])+' '+''.join(s[4:]))
s = input()

i = 0
lst = []
for j in range(1,len(s)+1):
    if lst[-1] != s[i:j]:
        lst.append(s[i:j])
        i = j

print(len(lst))

### FIXED CODE ###

s = input()

i = 0
lst = [""]
for j in range(1,len(s)+1):
    if lst[-1] != s[i:j]:
        lst.append(s[i:j])
        i = j

print(len(lst)-1)
X,t=map(int,input().split())
print(max(X-t,0)

### FIXED CODE ###

X,t=map(int,input().split())
print(max(X-t,0))
from collections import Counter

n = int(input())

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

counts = Counter(arr)

res = 0

for k,v in counts.items():
  if v>=2:
    res += v//2
    counts[k] = v%2
    
items = sorted(counts.items())
for i in range(len(items)-1):
  res+=min(items[i], items[i+1])
  
return res

### FIXED CODE ###

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

arr.sort()

res = 0
i=0
l = len(arr)
while i<l:
  res+=min(arr[i], arr[i+1])
  i+=2
  
print(res)
if input()=='1':
    print(Hello World)
else input()=='2':
    A=int(input())
    B=int(input())
    print(A+B)

### FIXED CODE ###

N = int(input())
if N==1:
    print('Hello World')
else:
    A=int(input())
    B=int(input())
    print(A + B)
l,r = map(int,input().split())

if r - l >= 2018 :
    print(0)
else:
    ans = 2019
    for i in range(l,r):
        for j in range(i + 1,r + 1)
            ans = min(ans,(i*j)%2019)
    print(ans)


### FIXED CODE ###

l,r = map(int,input().split())

if r - l >= 2018:
    print(0)
else:
    ans = 2019
    for i in range(l,r):
        for j in range(i+1,r+1):
            ans = min(ans,(i*j)%2019)
    print(ans)
n=int(input())
A=list(map(int,input().split()))
B=[0,0,0,0,0,0,0,0,0]
for i in range(n):
    now=int(A[i]/400)
    B[now]+=1

ans=int(0)
for i in range(8):
    if B[i]>0:
        ans+=1
    
print("{} {}".format(ans,ans+B[8]))

### FIXED CODE ###

n=int(input())
A=list(map(int,input().split()))
B=[0,0,0,0,0,0,0,0]
red=int(0)
for i in range(n):
    now=int(A[i]/400)
    if now<8:
        B[now]=1
    else:
        red+=1

ans=B.count(1)
if ans==0:
    ans=1
    red-=1
print("{} {}".format(ans,ans+red))
n=int(input())
ln=map(int,input().split())
print(abs(max(ln)-min(ln)+1))

### FIXED CODE ###

n=int(input())
ln=[int(n) for n in map(int,input().split())]
print(max(ln)-min(ln))
import numpy as np
import sys
from scipy.sparse.csgraph import floyd_warshall, csgraph_from_dense
N = int(input())
S = np.frombuffer(sys.stdin.buffer.read(),
                  dtype='S1').reshape(N, -1)[:, :N].astype(int)
G = csgraph_from_dense(S)
F = floyd_warshall(G).astype(int)
F2 = F % 2
I0 = np.where(F2[0] == 0)
I1 = np.where(F2[0] == 1)
if (S[I0][:, I0] == 0).all() and (S[I1][:, I1] == 0).all():
    print(F.max() + 1)
    exit()
print(-1)


### FIXED CODE ###

import numpy as np
import sys
from scipy.sparse.csgraph import floyd_warshall, csgraph_from_dense
N = int(sys.stdin.buffer.readline())
S = np.frombuffer(sys.stdin.buffer.read(),
                  dtype='S1').reshape(N, -1)[:, :N].astype(int)
G = csgraph_from_dense(S)
F = floyd_warshall(G).astype(int)
F2 = F % 2
I0 = np.where(F2[0] == 0)
I1 = np.where(F2[0] == 1)
if (S[I0][:, I0] == 0).all() and (S[I1][:, I1] == 0).all():
    print(F.max() + 1)
    exit()
print(-1)
a, b = gets.chomp.split(" ")
a = a.to_i
b = b.to_i
if a < b
    puts "a < b"
elsif a > b
    puts "a > b"
else
    puts "a == b"
end

### FIXED CODE ###

a,b=map(int, raw_input().split())

if a > b:
    print "a > b"
elif a < b:
    print "a < b"
else:
    print "a == b"
s = list(map(int, input().split()))
t = s.copy()
x = 0
y = 1

if t[0] == 0:
    t[0]=1
else:
    t[0]=0

for i in s:
    if s[i+1]==0 and s[i+1] == s[i]:
    	s[i+1]=1
    	x +=1
    elif s[i+1]==1 and s[i+1]==s[i]:
    	s[i+1]=0
    	x +=1

### FIXED CODE ###

S = input()
s = list(map(int, S))
t = s.copy()
n = len(s)
x = 0
y = 1

if t[0] == 0:
    t[0]=1
else:
    t[0]=0

for i in range(n-1):
    if s[i+1]==0 and s[i+1] == s[i]:
    	s[i+1]=1
    	x +=1
    elif s[i+1]==1 and s[i+1]==s[i]:
    	s[i+1]=0
    	x +=1
    
for i in range(n-1):
    if t[i+1]==0 and t[i+1] == t[i]:
    	t[i+1]=1
    	y +=1
    elif t[i+1]==1 and t[i+1]==t[i]:
    	t[i+1]=0
    	y +=1

print(min([x,y]))
import sys
print (int(sys.argv[1]) ** 3)

### FIXED CODE ###

i = int(raw_input())
print(i ** 3)
def main():
    n, m = map(int, input().split())
    s, c = []*m, []*m
    for i in range(m):
        a, b = map(int, input())
        s.append(a), c.append(b)
    for i in range(0, 10 ** n):
        loop = True
        string = str(i)
        if len(string) != n:
            continue
        for j in range(m):
            if string[s[j] - 1] != str(c[j]):
                loop = False
        if loop:
            print(string)
            quit()
    print(-1)
if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    s, c = []*m, []*m
    for i in range(m):
        a, b = map(int, input().split())
        s.append(a), c.append(b)
    for i in range(0, 10 ** n):
        loop = True
        string = str(i)
        if len(string) != n:
            continue
        for j in range(m):
            if string[s[j] - 1] != str(c[j]):
                loop = False
        if loop:
            print(string)
            quit()
    print(-1)
if __name__ == "__main__":
    main()
# coding:utf-8
s = input()
for i in range(n := len(s))
    if s[:i] + s[n-7+i:] == 'keyence':
        print('YES')
        exit()
print('NO')


### FIXED CODE ###

# coding:utf-8
s = input()
n = len(s)
for i in range(n):
    if s[:i] + s[n-7+i:] == 'keyence':
        print('YES')
        exit()
print('NO')
x,y,z=input().split()
x=int(x)
y=int(y)
z=int(z)
for i in range(11):
  d=x*z-y
  print(d)
  z=d

### FIXED CODE ###

a,b=input().split()
a=int(a)
b=int(b)
C=int(b/2)
if a>=13:
  print(b)
elif a<13 and a>=6:
  print(C)
else:
  print(0)
a=input()
if int(a) <= int(a[0])*111:
  print(int(a[0])*111)
else:
  print((int(a[0])+1)*111


### FIXED CODE ###

a=input()
if int(a) <= int(a[0])*111:
  print(int(a[0])*111)
else:
  print((int(a[0])+1)*111)
import math

a, b, x = list(map(int, input().split()))
if x>a**2*b/2:
    print(90-math.atan(a/(2*b-2*x/a**2))*180/math.pi)
else:
    print(90-math.atan(2*x/a/b**2)*180/math.pi)
        

### FIXED CODE ###

import math

a, b, x = list(map(int, input().split()))
if x==a**2*b:
    print(0)
elif x>a**2*b/2:
    print(90-math.atan(a/(2*b-2*x/a**2))*180/math.pi)
else:
    print(90-math.atan(2*x/a/b**2)*180/math.pi)