Harryxun/stf_run huggingface dataset:
N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]
A = [0]*N
if not(1 in a):
  A[0] = 1
if not(2 in a):
  A[1] = 1 + A[0]

for i in range(2,N):
  A[i] = A[i-2] + A[i-1]
  if i+1 in a:
    A[i] = 0
  A[i] %= 1000000007
print(A[N-1])
    

### FIXED CODE ###

N,M = map(int,input().split())
a = set(int(input()) for x in range(M))
A = [0]*(N+1)
mod = 1000000007
A[0] = 1
if not(1 in a):
  A[1] = 1
for i in range(2,N+1):
    if i in a:
      A[i] = 0
    else:
      A[i] = (A[i-2] + A[i-1]) % mod
print(A[N])
b, c = map(int, input().split())
if b<c:
  print("0")
else if:
  print("10")
  

### FIXED CODE ###

b, c = map(int, input().split())
num1 = 0
num2 = 10
if b<c:
  print(str(num1))
else:
  print(str(num2))
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

bonus=0
for x in range(0,n):
  if A[x] == A[x+1] +1:
    bonus += C[x]

ans = sum(B) + bonus
print(ans)

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
 
bonus=0
for x in range(1,n):
  if A[x-1]+1 == A[x]:
    bonus += C[A[x]-2]
 
ans = sum(B) + bonus
print(ans)
N=int(input())
D=int(input())
ans=0
for i in range(N):
  x,y=int(input()).split()
  if x*x + y*y <= D*D:
    ans +=1
print(ans)


### FIXED CODE ###

N,D=[int(i) for i in input().split()]
ans=0
for i in range(N):
  x,y=[int(i) for i in input().split()] 
  if x*x + y*y <= D*D:
      ans += 1
print(ans)
arr=[]
arr.append(int(raw_input());arr.append(int(raw_input());arr.append(int(raw_input())
print (arr[0]-arr[1])%(arr[2])

### FIXED CODE ###

a=int(raw_input());b=int(raw_input());c=int(raw_input())
print (a-b)%c
import sys 
line = sys.stdin.readline() 
while line : 
 H,W = map(int,line.split()) 
 if H == 0 and W == 0: break;
  for i in range(0,H):
   for j in range(0,W):
    if (i+j)%2 == 0: sys.stdout.write("#") 
    else: sys.stdout.write(".") 
          print ""
	print ""
 line = sys.stdin.readline()


### FIXED CODE ###

while 1:
 H, W = map(int,raw_input().split())
 if H + W == 0:break
 for h in range(H):
  if h % 2 == 0:
   if W % 2 == 0:
    print ('#.'*(W//2))
   else:
    print ('#.'*(W//2)+'#')
  else:
   if W % 2 == 0:
    print ('.#'*(W//2))
   else:
    print ('.#'*(W//2)+'.')
 print ''
N = int(input())
A = list(map(int,intput().split()))

for i in range(N):
    if A[i]%2 == 0 and (A[i]%3 != 0 and A[i]%5 != 0):
        print('DENIED')
        exit()

print('APPROVED')

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))

for i in range(N):
    if A[i]%2 == 0 and (A[i]%3 != 0 and A[i]%5 != 0):
        print('DENIED')
        exit()

print('APPROVED')
import math
n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if int(math.log10(x + y) + 1) > 80:
        print("overflow")
    else:
        print(x + y)



### FIXED CODE ###

n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if len(str(x + y)) > 80:
        print("overflow")
    else:
        print(x + y)
s = list(input())
Pflag = False
Dflag = False
if s[0] == "?":
  if s[1] == "D":
    s[0] = "P"
  if s[1] == "P":
    s[0] = "D"
  if s[1] == "?":
    s[0] = "P"
    s[1] = "D"
if s[-1] == "?":
  s[-1] = "D"
for index, i in enumerate(s):
  if i == "?":
    if s[index-1] == "P":
      s[index] = "D"
    if s[index+1] == "D":
      s[index] = "P"
    if s[index+1] == "?":
      s[index] = "P"
      s[index+1] = "D"
ans = "".join(s)
print(ans)

### FIXED CODE ###

s = list(input())
for index, i in enumerate(s):
  if i == "?":
    s[index] = "D"
ans = "".join(s)
print(ans)
import math
def main():

    N = int(input())
    A = list(map(int, input().split()))

    A = [v for v in A if v != 1]
    if len(set(A)) < len(A): return "not coprime"
    A = list(set(A))

    def searchPrimeNum(N):
        max = int(math.sqrt(N))
        seachList = [i for i in range(2,N+1)]
        primes = []
        while seachList[0] <= max:
            primes.append(seachList[0])
            tmp = seachList[0]
            seachList = [i for i in seachList if i % tmp != 0]
        primes.extend(seachList)
        return primes

    primes = searchPrimeNum(max(A))
    # print(primes)

    d = dict()
    ispair = True
    isset = True

    for v in A:
        for p in primes:
            if p <= v:
                if v % p == 0:
                    d[p] = d.get(p, 0) + 1
            else:
                break
    if any(d[p] > 1 for p in d):
        ispair = False
    if any(d[p] == N for p in d):
        isset = False

    if ispair:
        return "pairwise coprime"
    if isset:
        return "setwise coprime"

    return "not coprime"

if __name__ == '__main__':
    print(main())

### FIXED CODE ###

import math
import collections
def main():

    N = int(input())
    A = list(map(int, input().split()))

    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 a

    ispair = True
    isset = True

    d = dict()
    for v in A:
        for u in set(prime_factorize(v)):
            d[u] = d.get(u, 0) + 1
    # print(d)

    if any(d[p] > 1 for p in d):
        ispair = False
    if any(d[p] == N for p in d):
        isset = False

    if ispair:
        return "pairwise coprime"
    if isset:
        return "setwise coprime"

    return "not coprime"

if __name__ == '__main__':
    print(main())
N = int(input())
if N % 2 = 1:
    print(N*2)
else:
    print(N)

### FIXED CODE ###

N = int(input())
if N % 2 == 1:
    print(N*2)
else:
    print(N)
l = float(input())
print(math.pow((l/3), 3))

### FIXED CODE ###

l = float(input())
print((l/3)**3)
w,h,x,y=map(int,input().split())
n=0
if w%x==0 and h%y==0:
  n=1
print(float(w*h/2), end=" ")
print(n)

### FIXED CODE ###

w,h,x,y=map(int,input().split())
n=0
if w==2*x and h==2*y:
  n=1
print(float(w*h/2), end=" ")
print(n)
s = input()

for idx in range(len(s)):
    if s[idx] == '?':
        s[idx] = 'D'

print(s)
 

### FIXED CODE ###

s = input()

for idx in range(len(s)):
    if s[idx] == '?':
        print('D', end='')
    else:
        print(s[idx], end='')

print()
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
BC = []

for i in range(M):
    b,c = map(int,input().split())
    BC.append((b,c))

BC.sort(key=lambda x:x[1],reverse=True)

ind = 0
for b,c in BC:
    for i in range(b):
        if A[ind]>c or ind==N:
            print(sum(A))
            exit()
        else:
            A[ind]=c
            ind+=1

print(sum(A))



### FIXED CODE ###

N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
BC = []

for i in range(M):
    b,c = map(int,input().split())
    BC.append([b,c])

BC.sort(key=lambda x:x[1],reverse=True)

ind = 0
ans = 0
for b,c in BC:
    if c > A[min(ind+b,N-1)]:
        ans += c * min(b,N-ind)
        ind += b
    else:
        while c > A[ind]:
            ans += c
            ind += 1
    if ind >= N:
        print(ans)
        exit()
print(ans + sum(A[ind:]))
s = int(input())
w = int(input())
if(w >= s):
    print("unsafe")
else:
    print("safe")    


### FIXED CODE ###

s,w = map(int,input().split())
if(w >= s):
    print("unsafe")
else:
    print("safe")
s = input()
a, b = int(s[:2]), int(s[2:])

def func(i):
  if (i==0) | (i>12):
    return 'YY'
  else:
    return 'MM'
  
ans  = func(a) + func(b)
if (ans=='YYMM') | (ans=='MMYY'):
  print (ans)
elif ans=='MMMM':
  print ('AMBIGUOUS')
else:
  print('NA')

### FIXED CODE ###

n, k = (int(i) for i in input().split())
 
def win_num(f, k):
    i = 0
    F = f
    while F<k:
        F = f
        F = F*(2**i)
        i += 1
    if i == 0:
        return i
    else:
        return i - 1

ls = []
for f in range(n):
    wn = win_num(f+1, k)
    ls.append((1/n) * (1/2)**wn)
print(sum(ls))
N, L = map(int, input().split())
result = []

for i in range(N):
  result.append(i)
 
print("".join(sorted(result)))

### FIXED CODE ###

N, L = map(int, input().split())
result = []
 
for i in range(N):
  result.append(input())
 
print("".join(sorted(result)))
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce


def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


def LIST(): return list(map(int, input().split()))


def ZIP(n): return zip(*(MAP() for _ in range(n)))


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
	H, W, K = MAP()
	cake = [list(input()) for _ in range(H)]
	cut = [[0 for _ in range(W)] for _ in range(H)]
	lis_0 = []
	lis_1 = []
	num = 1
	for i in range(H):
		if cake[i].count("#") > 0:
			lis_1.append(i)
		else:
			lis_0.append(i)

		ct = 0
		for j in range(W):
			if cake[i][j] == "#":
				ct += 1
				if ct < 2:
					cut[i][j] = num
				else:
					num += 1
					ct = 0
					cut[i][j] = num
			else:
				cut[i][j] = num

		num += 1

	# print(lis_0)
	# print(lis_1)

	for x in lis_0:
		ind = bisect(lis_1, x)
		if ind == H-1:
			ind -= 1
		cut[x] = cut[lis_1[ind]]
		# print("x", cut[x])
		# print("ind", cut[lis_1[ind]])

	for x in cut:
		print(*x)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce


def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


def LIST(): return list(map(int, input().split()))


def ZIP(n): return zip(*(MAP() for _ in range(n)))


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
	H, W, K = MAP()
	cake = [list(input()) for _ in range(H)]
	cut = [[1 for _ in range(W)] for _ in range(H)]
	lis_0 = []
	lis_1 = []
	num = 1
	for i in range(H):
		if cake[i].count("#") > 0:
			lis_1.append(i)
		else:
			lis_0.append(i)
			continue

		ct = 0
		for j in range(W):
			if cake[i][j] == "#":
				ct += 1
				if ct < 2:
					cut[i][j] = num
				else:
					num += 1
					ct = 1
					cut[i][j] = num
			else:
				cut[i][j] = num

		num +=1

	# print(lis_0)
	# print(lis_1)

	for x in lis_0:
		ind = bisect(lis_1, x)
		# print(ind)
		if ind == len(lis_1):
			ind -= 1
		cut[x] = cut[lis_1[ind]]
		# print("x", cut[x])
		# print("ind", cut[lis_1[ind]])

	for x in cut:
		print(*x)


if __name__ == '__main__':
    main()
from collections import deque
import sys

def fnw(n,s):
    sm=deque([])
    if n<=len(s):
        for _ in range(n):
            sm.append(s.popleft())
    return ''.join(sm)

def jfws(s):
    print(s)
    fws=fnw(5,s)
    # print(fws)
    if fws=='dream':
        fws=fnw(2,s)
        if fws=='er':
            if s:
                if s[0]=='a':
                    s.extendleft(deque(reversed(list(fws))))
        else:
            s.extendleft(deque(reversed(list(fws))))
        return False
    elif fws=='erase':
        fws=fnw(1,s)
        if fws!='r' or '':
            s.appendleft(fws)
        return False
    else:
        return True 

def main(s):
    while s:
        if jfws(s):
            return 'NO'
        print(s)
    return 'YES'

s=deque(sys.stdin.readline().strip())
print(main(s))



### FIXED CODE ###

from collections import deque
import sys

def fnw(n,s):
    sm=deque([])
    if n<=len(s):
        for _ in range(n):
            sm.append(s.popleft())
    return sm

def jfws(s):
    # print(s)
    sm=fnw(5,s)
    # print(sm)
    if ''.join(sm)=='dream':
        sm=fnw(2,s)
        if ''.join(sm)=='er':
            if bool(s):
                if s[0]=='a':
                    s.extendleft(deque(reversed(list(sm))))
        else:
            s.extendleft(deque(reversed(list(sm))))
        return False
    elif ''.join(sm)=='erase':
        sm=fnw(1,s)
        if ''.join(sm)!='r':
            s.extendleft(sm)
        return False
    else:
        return True 

def main(s):
    while len(s)>0:
        if jfws(s):
            return 'NO'
    return 'YES'

s=deque(sys.stdin.readline().strip())
print(main(s))
from collections import Counter


def main(N=None, S=None):
    if not N or not S:
        N = int(input())
        S = int(input())
    c = Counter(S)
    ans = c["R"]*c["G"]*c["B"]
    for hop in range(1, N//2):
        for start in range(N):
            i = start
            j = start + hop
            k = start + hop*2
            if k >= N:
                break
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
                ans -= 1
            # print(i, j, k, ans)
    print(ans)
    return ans


if __name__ == "__main__":
    # assert main(4, "RRGB") == 1
    # assert main(39, "RBRBGRBGGBBRRGBBRRRBGGBRBGBRBGBRBBBGBBB") == 1800
    main()


### FIXED CODE ###

from collections import Counter


def main(N=None, S=None):
    if not N or not S:
        N = int(input())
        S = input()
    c = Counter(S)
    ans = c["R"]*c["G"]*c["B"]
    for hop in range(1, N):
        for start in range(N):
            i = start
            j = start + hop
            k = start + hop*2
            if k >= N:
                break
            if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
                ans -= 1
            # print(i, j, k, ans)
    print(ans)
    return ans


if __name__ == "__main__":
    # assert main(4, "RRGB") == 1
    # assert main(39, "RBRBGRBGGBBRRGBBRRRBGGBRBGBRBGBRBBBGBBB") == 1800
    main()
def saidaikouyaku(a, b):
    if b > a:
        a, b = b, a

    while b != 0:
        a, b=b,(a%b)
    return a

A, B, C, D = map(int, input().split())
hani = B - A + 1
Cnum = int(B / C) - int((A - 1) / C)
Dnum = int(B / D) - int((A - 1) / D)
saisyoukoubai = int(C * D / saidaikouyaku(C, D))
koubainum = int(B / saisyoukoubai) - int((A - 1) / saisyoukoubai)
#print(hani)
#print(Cnum, Dnum, koubainum, saisyoukoubai)
print(hani - Cnum - Dnum + koubainum)


### FIXED CODE ###

S = int(input())

a = S % 10
b = int((S % 100) / 10)
c = int(S % 1000 / 100)
d = int(S / 1000)

if a == b or b == c or c == d:
    print("Bad")
else:
    print("Good")
def make_prime(n):
    prime = []
    temp = n
    for i in range(2, int(n**0.5) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            prime.append([i, cnt])
    if temp!=1:
        prime.append([temp, 1])
    if prime==[]:
        prime.append([n, 1])

    return prime
def factional_for(n):
    result = 1
    for i in range(n, 0, -1):
        result *= i
    return result
num = int(input())
s=0
prime_num_list = make_prime(factional_for(num))
print(prime_num_list)
for i in range(len(prime_num_list)):
    s += prime_num_list[i][1]+1
print(s)


### FIXED CODE ###

def make_prime(n):
    prime = []
    temp = n
    for i in range(2, n):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            prime.append([i, cnt])
    if temp!=1:
        prime.append([temp, 1])
    if prime==[]:
        prime.append([n, 1])

    return prime


from collections import defaultdict
d=defaultdict(lambda :1)
num = int(input())
w=10**9+7
for i in range(2,num+1):
    prime_num_list = make_prime(i)
    for j in range(len(prime_num_list)):
        key = prime_num_list[j][0]
        d[key] += prime_num_list[j][1]
cnt=1
for val in d.values():
    cnt*=val%w
print(cnt%w)
list[0] = int(input())/3600
a_p = int(input())%3600
list[1] = a_p/60
list[2] = a_p%60

print ":".join(list)

### FIXED CODE ###

int = int(input())

h = int // 3600
h_mod = int % 3600

m = h_mod // 60
s = h_mod % 60

print(h, ":", m, ":", s, sep='')
H, N = map(int, input().split())
A = [0]*N
B = [0]*N
C = [0]*N
for i in range(N):
    A[i],B[i] = map(int, input().split())
    C[i] = A[i]/B[i]
for i in range(N):
    for j in range(H+1):
        dp[i+1][j] = min(dp[i][j],dp[i+1][max(j-A[i],0)]+B[i])
print(dp[N][H])

### FIXED CODE ###

H, N = map(int, input().split())
A = [0]*N
B = [0]*N
C = [0]*N
for i in range(N):
    A[i],B[i] = map(int, input().split())
    C[i] = A[i]/B[i]
inf=float("inf")
dp = [[inf for i in range(H+1)] for j in range(N+1)]
for i in range(N+1): dp[i][0]=0
for i in range(N):
    for j in range(H+1):
        dp[i+1][j] = min(dp[i][j],dp[i+1][max(j-A[i],0)]+B[i])
print(dp[N][H])
N = int(input())
q = 0
flug = 0
while q <= N :
        if N%7 == 0:
                flug = 1
                break
	if N - q % 4 == 0:
		flug = 1
		break
	q = q + 7

if flug == 1:
	print("Yes")
else:
	print("No")

### FIXED CODE ###

N = int(input())
q = 0
flug = 0
while q <= N :
	if N%7 == 0:
		flug = 1
		break
	
	if (N-q)%4 == 0:
		flug = 1
		break
	q = q + 7
 
if flug == 1:
	print("Yes")
else:
	print("No")
a = input()
b = input()
print a*b +' '+ 2*(a+b)

### FIXED CODE ###

m = map(int,raw_input().split())
print m[0]*m[1],2*(m[0]+m[1])
s=input()
alh="abcdefghijklmnopqrstuvwxyz"
exist=False
ans="None"
for i in alf:
  if i in s:
    exist=True
  if not exist:
    ans=i
    break
print(ans)

### FIXED CODE ###

s=input()
alp="abcdefghijklmnopqrstuvwxyz"
ans="None"
for i in alp:
  exist=False
  if i in s:
    exist=True
  if not exist:
    ans=i
    break
print(ans)
r = int(input)
print(r**2)

### FIXED CODE ###

r = int(input())
print("{}".format(int(r**2)))
n=int(input())  
h=list(map(int, input().split()))
count = 0
max_count = 0
for i in range(n-1):
    if h[i+1] < h[i]:
        count = count + 1
    else:
        max_count = max(max_count,count)
        count = 0
print(max(max_count,count))


### FIXED CODE ###

s = input()
t = input()
count = 0
for i in range(3):  
  if s[i] == t[i]:
       count = count+ 1
print(count)
a = input()
print(6.28318530717958623200*a)

### FIXED CODE ###

a=input()
print(eval(a)*6.28318530717958623200)
#!/usr/bin/env python3
import sys, math, fractions, itertools

num = [2, 5, 5, 4, 5, 6, 3, 7, 6]

def solve(N: int, M: int, A: "List[int]"):
    dp = [-1e18] * (N+1)
    dp[0] = 0
    for i in range(1, N+1):
        m = 0
        for a in A:
            m = max(m, dp[i-num[a-1]]+1)
        dp[i] = m
    for i in range(1, N):
        if dp[i] == 0:
            dp[i] = -1
    dd = dp[N]
    ans = ''
    nn = N
    for i in range(dd):
        for a in reversed(sorted(A)):
            if dp[nn-num[a-1]] == dp[nn] - 1:
                ans += str(a)
                nn -= num[a-1]
                break
    print(ans)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(M) ]  # type: "List[int]"
    solve(N, M, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys, math, fractions, itertools

l = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]

def solve(N: int, M: int, A: "List[int]"):
    dp = [-1] * (N+10) # 初期化
    dp[0] = 0 # 初期化
    for i in range(N-1): # 各桁について考える
        for s in A: # 各使える数字をみる
            if dp[i] == -1 and i!=0: # 条件を満たすように作れない場合、continue
                continue
            if dp[i + l[s]] < dp[i]*10+s:
                dp[i + l[s]] = dp[i]*10+s
    print(dp[N])
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(M) ]  # type: "List[int]"
    solve(N, M, A)

if __name__ == '__main__':
    main()
A,B=map(int,input.split())
if A*B*1%2==1 or A*B*2%2==1 or A*B*3%2==1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

A,B=map(int,input().split())
if A*B*1%2==1 or A*B*2%2==1 or A*B*3%2==1:
  print("Yes")
else:
  print("No")
# -*- coding: utf-8 -*-
# 文字列の入力
S = str(input())

ans=0

if len(S)==1:
  ans=0
elif len(S)==2:
  if S[0]==S[1]:
    ans=1
  else:
    ans=0
else: #3枚以上はちゃんと読み込む
  strint=[]
  original_string=[]
  
  for i in range(len(S)):
    string.append(S[i])
    original_string.append(S[i])
    
  for i in range(len(S)-2):
    gramed = str(string[i])+str(string[i+1])+str(string[i+2])
    
    if gramed=="000":
      string[i+1]="1"
    if gramed=="001":
      string[i]="1"
    if gramed=="011":
      string[i+2]="0"
    if gramed=="110":
      string[i]="0"
    if gramed=="100":
      string[i+2]="1"
    if gramed=="111":
      string[i+1]="1"
  
  print(string)
  print(original_string)
  
  for i in range(len(S)):
    if original_string[i]!=string[i]:
      ans=ans+1
  
print(ans)

### FIXED CODE ###

#124c
S = str(input())
#################01234567
ans_b_start = 0 #01010101…
ans_w_start = 0 #10101010…

for i in range(len(S)):
    if i%2==0:
        if S[i]=="0":
            ans_w_start+=1
        if S[i]=="1":
            ans_b_start+=1
    if i%2==1:
        if S[i]=="0":
            ans_b_start+=1
        if S[i]=="1":
            ans_w_start+=1
        
if ans_w_start > ans_b_start:
    print(ans_b_start)
else:
    print(ans_w_start)
# coding:utf-8

x, y, z = list(map(int, input().split()))
if x = 5 and y = 7 and z = 5:
  print("YES")
elif x = 7 and y = 5 and z = 5:
  print("YES")
elif x = 5 and y = 5 and z = 7:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

# coding:utf-8
 
x, y, z = list(map(int, input().split()))
if x == 5 and y == 7 and z == 5:
  print("YES")
elif x == 7 and y == 5 and z == 5:
  print("YES")
elif x == 5 and y == 5 and z == 7:
  print("YES")
else:
  print("NO")
n=int(input())
a=[[0]*10 for i in range(10)]
for i in range(1,n+1):
    a[int(str(i)[0])][i%10]+=1
def N(x,y): # no of x...y < n
    return a[x][y]

ans=0
for x in range(1,10):
    ans+=N(x,x)*N(x,x)
    for y in range(x+1,10):
        ans+=N(x,y,n)*N(y,x,n)*2
print(ans)

### FIXED CODE ###

def N(x,y,n): # no of x...y < n
    if n<100:
        r=0
        for i in range(1,n+1):
            if str(i)[0]==str(x) and str(i)[-1]==str(y):
                r+=1
        return r
    
    r=N(x,y,99)
    d=len(str(n))
    for i in range(1,d-2):
        r+=10**i
    top=int(str(n)[0])
    if top<x:
        r+=0
    elif top==x:
        r+=int(str(n)[1:-1])
        if str(n)[-1]>=str(y):
            r+=1
    else:
        r+=10**(d-2)

        
    return r


ans=0
n=int(input())
for x in range(1,10):
    for y in range(1,10):
        ans+=N(x,y,n)*N(y,x,n)
print(ans)
a=int(input())
b=list(input())
c=0
for i in range(a):
  if b[i]=='A':
    if b[i]+b[i+1]+b[i+2]=='ABC':
      c+=1
  else:
    pass
print(c)    


### FIXED CODE ###

n=int(input())
s=list(input())
d=0
for i in range(n):
  if n-(i+1)>=2:
    if s[i]=='A' and s[i+1]=='B' and s[i+2]=='C':
      d+=1
  else:
    pass
print(d)