Harryxun/stf_run huggingface dataset:
five = 0;
seven = 0;

if A == 5:
    five +=1
elif A == 7:
        seven +=1

if B == 5:
    five +=1
elif B == 7:
        seven +=1

if C == 5:
    five +=1
elif C == 7:
        seven +=1

if five == 2 and seven == 1:
    print 'YES'
else: print 'NO'


### FIXED CODE ###

# -*- coding: utf-8 -*-
# 整数の入力
a, b, c = map(int, input().split())
# カウンタのクリア
five_count = 0
seven_count = 0
# 5,7,5を判定
def setsu_check(x):
	global five_count, seven_count
	if x == 5:
		five_count+=1
	elif x == 7:
		seven_count+=1
# 判定関数のCALL
setsu_check(a)
setsu_check(b)
setsu_check(c)
if five_count == 2 and seven_count == 1:
	print("YES")
else:
	print("NO")
# -*- coding: utf-8 -*-
n, k = map(int, input().split())
s = input()
bl = []

left = -1
right = 0
for i in range(len(s)):
    if s[i] == '0':
        if left < 0:
            left = i
        if i == n - 1:
            right = n
            bl.append((left, right))
    else:
        if left >= 0:
            right = i
            bl.append((left, right))
            left = -1


def change(index, count, ts):
    if count >= k or index >= len(bl):
        max_seq = 0
        seq = 0
        for i in range(len(ts)):
            if ts[i] == '1':
                seq += 1
                if i == n - 1:
                    max_seq = max(max_seq, seq)
            else:
                max_seq = max(max_seq, seq)
                seq = 0
        return max_seq

    new_s = ts[:bl[index][0]] + '1' * \
        (bl[index][1] - bl[index][0]) + ts[bl[index][1]:]
    return max(change(index + 1, count + 1, new_s),
               change(index + 1, count, ts))


if k >= len(bl):
    print(len(s))
else:
    print(change(0, 0, s))


### FIXED CODE ###

# -*- coding: utf-8 -*-
n, k = map(int, input().split())
s = input()
nums = []
now = 1

cnt = 0
for i in range(n):
    if s[i] == str(int('0') + now):
        cnt += 1
    else:
        nums.append(cnt)
        now = 1 - now
        cnt = 1

if cnt != 0:
    nums.append(cnt)

ans = 0
left = 0
right = 0
tmp = 0

for i in range(0, len(nums), 2):
    next_left = i
    next_right = min(i + 2 * k + 1, len(nums))

    while (left < next_left):
        tmp -= nums[left]
        left += 1

    while (right < next_right):
        tmp += nums[right]
        right += 1

    ans = max(ans, tmp)

print(ans)
import math
from functools import reduce

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

n = int(input())
A = list(map(int, input().split()))
ans = gcd(*A)
print(str(ans))

### FIXED CODE ###

import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

n = int(input())
A = list(map(int, input().split()))
ans = gcd(*A)
print(str(ans))
a=input()
print(48-a)

### FIXED CODE ###

a=int(input())
print(48-a)
N = int(input())
A = list(map(int, input().split()))
abs_A =  map(lambda x: abs(x), A)

pos = []
neg = []
ans = 0

for e in A:
    if e > 0:
        pos.append(e)
    else:
        neg.append(e)
if len(neg) % 2 == 0:
    ans = sum(abs_A)
else:
    """pos.sort(reverse=True)
    neg.sort(reverse=True)
    if len(neg) == N:
        ans = -sum(neg[:-1]) + neg[-1]
    else:"""
    #ans = max(-sum(neg[:-1]) + neg[-1], -sum(neg[:-3]) + sum(neg[-3:]))
    #ans = max(sum(pos[:-1])-pos[-1]-sum(neg), sum(pos) + neg[0] -sum(neg[1:]))
    ans = sum(abs_A)
    ans -= 2 * min(abs_A)
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
abs_A = list(map(lambda x: abs(x), A))

pos = []
neg = []
ans = 0

for e in A:
    if e > 0:
        pos.append(e)
    else:
        neg.append(e)
if len(neg) % 2 == 0:
    ans = sum(abs_A)
else:
    """pos.sort(reverse=True)
    neg.sort(reverse=True)
    if len(neg) == N:
        ans = -sum(neg[:-1]) + neg[-1]
    else:"""
    #ans = max(-sum(neg[:-1]) + neg[-1], -sum(neg[:-3]) + sum(neg[-3:]))
    #ans = max(sum(pos[:-1])-pos[-1]-sum(neg), sum(pos) + neg[0] -sum(neg[1:]))
    ans = sum(abs_A)
    ans -= 2 * min(abs_A)
print(ans)
sols = []
while True:
    x = list(input().split())
    a = int(x[0])
    b = int(x[2])
    oprnd = x[1]
    if oprnd=="+":
        sols.append(a+b)
    elif oprnd=="-":
        sols.append(a-b)
    elif oprnd=="*":
        sols.append(a*b)
    elif oprnd=="/":
        sols.append(a/b)
    elif oprnd=="?":
        break
for i in len(sols):
    print(sols[i])

### FIXED CODE ###

import math
while True:
    x = input().split()
    a = int(x[0])
    b = int(x[2])
    oprnd = x[1]
    if oprnd=="+":
        print(a+b)
    elif oprnd=="-":
        print(a-b)
    elif oprnd=="*":
        print(a*b)
    elif oprnd=="/":
        print(math.floor(a/b))
    elif oprnd=="?":
        break
from collections import deque

def bfs(maze, visited, sy, sx, gy, gx):
  queue = deque([[sy, sx]])
  visited[sy][sx] = 0
  while queue:
    y,x = queue.popleft()
    if [y, x] == [gy, gx]:
      return visited[y][x]
    for j, k in ([1, 0], [-1, 0], [0, 1], [0, -1]):
      new_y, new_x = y+j, x+k
      if maze[new_y][new_x] == "." and visited[new_y][new_x] == -1:
        visited[new_y][new_x] = visited[y][x] + 1
        queue.append([new_y, new_x])

h,w = map(int,input().split())
wall = ''
for i in range(w+2):
  wall += '#'
maze = [wall]
for i in range(h) :
  m1 = input()
  maze.append('#'+m1+'#')
maze .append(wall)

ans = []
for i in range(1,h+1) :
  for j in range(1+w+1):
    for k in range(1,h+1) :
      for l in range(1,w+1) :
        sy = i ; sx = j
        gy = k ; gx = l
        if maze[sy][sx] == '#' or maze[gy][gx] == '#':
          break
        visited = [[-1]*(w+2) for _ in range(h+2)]
        ans.append(bfs(maze, visited, sy, sx, gy, gx))

print(max(ans))

### FIXED CODE ###

from collections import deque

def bfs(maze, visited, sy, sx):
  queue = deque([[sy, sx]])
  visited[sy][sx] = 0
  va = 0
  while queue:
    y,x = queue.popleft()
    if visited[y][x] > va :
      va = visited[y][x]
    for j, k in ([1, 0], [-1, 0], [0, 1], [0, -1]):
      new_y, new_x = y+j, x+k
      if maze[new_y][new_x] == "." and visited[new_y][new_x] == -1:
        visited[new_y][new_x] = visited[y][x] + 1
        queue.append([new_y, new_x])
  return va

h,w = map(int,input().split())
wall = ''
for i in range(w+2):
  wall += '#'
maze = [wall]
for i in range(h) :
  m1 = input()
  maze.append('#'+m1+'#')
maze .append(wall)

ans = []
for sy in range(1,h+1) :
  for sx in range(1+w+1):
    if maze[sy][sx] == '#' :
      continue
    visited = [[-1]*(w+2) for _ in range(h+2)]
    ans.append(bfs(maze, visited, sy, sx))

print(max(ans))
a , b=map(int , input() , split() )
if(a*b)%2:
    print("Odd")
else:
    print("Even")


### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
n=int(input())
s=input()

i=0
for ss in s:
  if ss=="#":
    break
  i+=1

s=s[i:]  
  
cnt=0
while s[-1]=="#":
  s=s[:-1]
  if s=="":
    print(0)
    exit()
  
print(min(s.count("."),s.count("#")))

  

### FIXED CODE ###

n=int(input())
s=input()
s=s

ll=0 #左側の黒い数を保持
rr=s.count(".") #右側の白い数を保持

result=ll+rr
for item in s:
    if item=="#":
        ll+=1
    else:
        rr-=1
    
    result=min(result,ll+rr)

print(result)
A, B = map(int, input().split())
input_list = input().split( )

for i in (range(input_list)):
  input_list[i] = int(input_list)

input_sum = sum(input_list)

if(A <= input_sum):
  print("Yes")
else:
  print("No")


### FIXED CODE ###

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

for i in (range(len(input_list))):
  input_list[i] = int(input_list[i])

input_sum = sum(input_list)

if(A <= input_sum):
  print("Yes")
else:
  print("No")
import numpy as np
N = int(input())
K = int(input())

e = [0]*N

for i in range(N):
    e[i] = int(input())

for i in range(N):
    print("i",i)
    for j in range(N):      
        if e[i] < e[j]:
            tmp = e[i]
            e[i] = e[j]
            e[j] = tmp

f = [0]*(N - K + 1)
for i in range(N-K+1):
    f[i] = e[K + i - 1] - e[i]

print(np.min(np.array(f)))

### FIXED CODE ###

import numpy as np
N,K=input().split()
N = int(N)
K = int(K)
e = [0]*N

for i in range(N):
    e[i] = int(input())

#for i in range(N):
#    for j in range(N):      
#        if e[i] < e[j]:
#            tmp = e[i]
#            e[i] = e[j]
#            e[j] = tmp

e = list(sorted(e))

f = [0]*(N - K + 1)
for i in range(N-K+1):
    f[i] = e[K + i - 1] - e[i]

print(np.min(np.array(f)))
a ,b= int(input().split())
if a-2*b=>0:
  print({}.format(a-2*b))
else:
  print("0")


### FIXED CODE ###

while True:
    a,b = input().split()
    a = int(a)
    b = int(b)
    if 1<=a<=100 and 1<=b<=100:
        break
c = a-2*b
if c>0:
    print(c)
else:
    print(0)
def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        return z
A, B, K = map(int, input().split())
A_B_gcd = gcd(A, B)
yakusuu_arr = []
for i in range(1, A_B_gcd):
    if A_B_gcd % i == 0:
        yakusuu_arr.append(i)
print(yakusuu_arr[K-1])

### FIXED CODE ###

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x % y == 0:
        return y
    else:
        while True:
            if x % y != 0:
                z = x % y
                x = y
                y = z
            else:
                break
        return z
A, B, K = map(int, input().split())
A_B_gcd = gcd(A, B)
yakusuu_arr = []
for i in range(1, A_B_gcd+1):
    if A_B_gcd % i == 0:
        yakusuu_arr.append(i)
yakusuu_arr.sort(reverse=True)
print(yakusuu_arr[K-1])
N, K = map(int,input().split())
    ans = 0.0
    for i in range(1,N+1,1):
        count = 0
        tmp = i
        if tmp < K:
            while True:
                tmp *= 2
                count += 1
                if tmp>K:
                    break
    ans += float(1/N)*(0.5**count)
    print(ans)

### FIXED CODE ###

N, K = map(int,input().split())
ans = 0.0
for i in range(1,N+1,1):
    count = 0
    tmp = i
    if tmp < K:
        while True:
            tmp *= 2
            count += 1
            if tmp>=K:
                break
    ans += float(1/N)*(0.5**count)
print(ans)
a,b=map(int,input().split());print([1,0][a%b==0]))

### FIXED CODE ###

a,b=map(int,input().split())
print(0 if a%b==0 else 1)
import sys
input = sys.stdin.readline

Num_str = list(input().rstrip())
L = len(Num_str)
Num = []

for n in reversed(Num_str):
    Num.append(int(n))

S = 0
up = False
for i, n in enumerate(Num):
    if up:
        n += 1
    if n < 5:
        S += n
        up = False
    elif n == 5:
        S += 5
        up = i != L and Num[i+1] >= 5
    else:
        S += 10 - n
        up = True
if up:
    S += 1
print(S)

### FIXED CODE ###

import sys
input = sys.stdin.readline

Num_str = list(input().rstrip())
L = len(Num_str)
Num = []

for n in reversed(Num_str):
    Num.append(int(n))

S = 0
up = False
for i, n in enumerate(Num):
    if up:
        n += 1
    if n < 5:
        S += n
        up = False
    elif n == 5:
        S += 5
        up = (i != L-1 and Num[i+1] >= 5)
    else:
        S += 10 - n
        up = True
if up:
    S += 1
print(S)
i = list(map(int, input().split()))
if i[0]　% i[1] == 0:
    print "Even"
else:
    print "Odd"


### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
n = int(input())
S = ['S']
H = ['H']
C = ['C']
D = ['D']
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def print(list):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(list[0], i), end = "\n")
print(S)
print(H)
print(C)
print(D)
 

### FIXED CODE ###

n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')
t = list(input())
for i in range(len(t)):
    if t[i]=="?":
        if i==0:
            if t[i+1]=="D" or t[i+1]=="?":
                t[i] = "P"
                t[i+1] = "D"
            else:
                t[i] = "D"
        elif i!=len(t)-1:
            if t[i-1]=="P":
                t[i] = "D"
            if t[i+1]=="D" or t[i+1]=="?":
                t[i] = "P"
                t[i+1] = "D"
        else:
            t[i] = "D"
print(*t,sep="")

### FIXED CODE ###

t = list(input())
for i in range(len(t)):
    if t[i]=="?":
        if i==0 and len(t)!=1:
            if t[i+1]=="D" or t[i+1]=="?":
                t[i] = "P"
                t[i+1] = "D"
            else:
                t[i] = "D"
        elif i!=len(t)-1:
            if t[i-1]=="P":
                t[i] = "D"
            elif t[i+1]=="D" or t[i+1]=="?":
                t[i] = "P"
                t[i+1] = "D"
            else:
                t[i] = "D"
        else:
            t[i] = "D"
print(*t,sep="")
import math;n = int(input());l = [list(map(int,input().split())) for i in range(n)];dist = 0
for x1,y1 in l:for x2,y2 in l:dist += math.sqrt((x1-x2)**2 + (y1-y2)**2)
print(dist/n)


### FIXED CODE ###

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

import math
sum=0  
for j in range(n):
  q=c[j][0];w=c[j][1]
  for k in range(j):
    sum+=math.sqrt((c[k][0]-q)**2+(c[k][1]-w)**2)
    
print(float(sum*2/n))
'''
a,op,b = input().split()

a,b = int(a),int(b)
'''
###############################################################
#whileの中に入れないと同じデータセットでの計算をずっとし続ける#
###############################################################

while True:
	a,op,b = input().split()

	a,b = int(a),int(b)

	if op == +:
		print(a+b)
	elif op == -:
		print(a-b)
	elif op == *:
		print(a*b)
	elif op == /:
		print(a/b)
	elif op == ?:
		break



### FIXED CODE ###

'''
a,op,b = input().split()

a,b = int(a),int(b)
'''
###############################################################
#whileの中に入れないと同じデータセットでの計算をずっとし続ける#
###############################################################

while True:
	a,op,b = input().split()

	a= int(a)
	b = int(b)

	if op == '+':
		print(a+b)
	elif op == '-':
		print(a-b)
	elif op == '*':
		print(a*b)
	elif op == '/':
		print(a//b)
	elif op == '?':
		break
from math import sqrt, isclose

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

if isclose(sqrt(c) - (sqrt(a) + sqrt(b)), 0):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

from math import sqrt
from decimal import Decimal, getcontext

a, b, c = map(int, input().split())
if c - a - b > 0 and (c - a - b) ** 2 > 4 * a * b:
    print("Yes")
else:
    print("No")
N = int(input())
Y = int(input())
for i in range(N+1):
    for j in range(N+1):
        if ((N-i-j) >= 0 and i*10000 + j*5000 + (N-(i+j))*1000 == Y):
            print(i, j, N-i-j)
            exit()
print(-1, -1, -1)


### FIXED CODE ###

N, Y = list(map(int, input().split()))
for i in range(N+1):
    for j in range(N+1):
        if ((N-i-j) >= 0 and i*10000 + j*5000 + (N-(i+j))*1000 == Y):
            print(i, j, N-i-j)
            exit()
print(-1, -1, -1)
#import sys;sys.setrecursionlimit(int(1e7))

class edge():
    def __init__(self,_to,_cost):
        self.to = _to;
        self.cost = _cost;

N = int(input())
tree = [[] for i in range(N+1)]

for i in range(N-1):
    a,b,c = map(int,input().split())
    a = a - 1
    b = b - 1
    tree[a].append(edge(b,c))
    tree[b].append(edge(a,c))
Q,K = map(int,input().split())
K = K - 1
depth = [None]*N

def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e.to == p:
            continue
        DFS(e.to, v, d + e.cost)
DFS(K,-1,0)

for _ in range(Q):
    x,y = map(int, input().split())
    x = x - 1
    y = y - 1
    print(depth[x] + depth[y])


### FIXED CODE ###

import sys;sys.setrecursionlimit(int(1e7))

class edge():
    def __init__(self,_to,_cost):
        self.to = _to;
        self.cost = _cost;

N = int(input())
tree = [[] for i in range(N+1)]

for i in range(N-1):
    a,b,c = map(int,input().split())
    a = a - 1
    b = b - 1
    tree[a].append(edge(b,c))
    tree[b].append(edge(a,c))
Q,K = map(int,input().split())
K = K - 1
depth = [None]*N

def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e.to == p:
            continue
        DFS(e.to, v, d + e.cost)
DFS(K,-1,0)

for _ in range(Q):
    x,y = map(int, input().split())
    x = x - 1
    y = y - 1
    print(depth[x] + depth[y])
for i in range(1,int(input())+1):
 if a%3==0 or a%10==3:print(f' {i}',end='')

### FIXED CODE ###

print('',*[i for i in range(3,int(input())+1)if i%3==0 or'3'in str(i)])
n ,a , b = map(int,input(),split())
t = n*a
if t>b:
    print(b)
else:
    print(t)

### FIXED CODE ###

n , a , b = map(int,input().split())
t = n*a
if t>b:
    print(b)
else:
    print(t)
n,k = map(int, input().split())
print(len(str(int(n,k))))

### FIXED CODE ###

n,k = map(int, input().split())
s = 1
c = 0
while n//s > 0:
  s *= k
  c += 1
print(c)
I0 = lambda :map(int,input().split())
I1 = lambda :int(input())
I2 = lambda :list(map(int,input().split()))
#####################################################
from collections import defaultdict
n = I1()
d = defaultdict(int)
for i in range(n):
    d[sorted(input())]+=1
res=0
for i in d.keys():
    if d[i] > 1:
        yy=d[i]-1
        res+=yy*(yy+1)//2
print(res)


### FIXED CODE ###

I0 = lambda :map(int,input().split())
I1 = lambda :int(input())
I2 = lambda :list(map(int,input().split()))
#####################################################
from collections import defaultdict
n = I1()
d = defaultdict(int)
for i in range(n):
    d["".join(sorted(input()))]+=1
res=0
for i in d.keys():
    if d[i] > 1:
        yy=d[i]-1
        res+=yy*(yy+1)//2
print(res)
def insertionSort(lis,leng):
    for i in range(leng):
        v = lis[i]
        j = i - 1
        while j >= 0 and lis[j] > v:
            lis[j+1] = lis[j]
            j = j-1
        lis[j+1]=v
        print("".join(lis))

        
if __name__ == "__main__":
    lengg=int(input())
    liss=map(int,input().split())
    insertionSort(liss,lengg)

### FIXED CODE ###

def insertionSort(lis,leng):
    for i in range(leng):
        v = lis[i]
        j = i - 1
        while j >= 0 and lis[j] > v:
            lis[j+1] = lis[j]
            j = j-1
        lis[j+1]=v
        print(*lis)

        
if __name__ == "__main__":
    lengg=int(input())
    liss=list(map(int, input().split()))
    insertionSort(liss,lengg)
x=int(input())
    print (x*x*x)

### FIXED CODE ###

x=int(input())
print (x*x*x)
N, M = map(int, input().split())
ab = [[int(a) for a in input().split()] for _ in range(N)]
cd = [[int(a) for a in input().split()] for _ in range(M)]
for i in range(N):
    min_distance = 99999
    for j in range(M):
        manhattan_distance = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
        if min_distance > manhattan_distance:
            min_distance = manhattan_distance
            check_point = j+1
    print(check_point)

### FIXED CODE ###

if __name__ == '__main__':
    student_count, checkpoint_count = map(int, input().split())
    student_points = [list(map(int, input().split())) for i in range(1, student_count + 1)]
    check_points = [list(map(int, input().split())) for i in range(1, checkpoint_count + 1)]
 
    for student_point_x, student_point_y in student_points:
        point_number = 0
        shortest_distance = float('inf')
        manhattan_distance = 0
 
        for i in range(len(check_points)):
            diff_x = abs(student_point_x - check_points[i][0])
            diff_y = abs(student_point_y - check_points[i][1])
            manhattan_distance = diff_x + diff_y
 
            if manhattan_distance < shortest_distance:
                shortest_distance = manhattan_distance
                point_number = i + 1
 
        print(point_number)
A, B, N = list(map(int, input().split()))

if B==1:
  print(0)

tb = B - 1
tp_pre = 0
while(True):
  tp = (A*tb)//B - A*(tb//B)
  if tp > tp_pre:
    tp_pre = tp
  tb += B
  if tb > N:
    break

if (B > N):
  print((A*N)//B - A*(N//B))
else:
  print(int(tmp_pre))

### FIXED CODE ###

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

if B==1:
  print(0)
else:
  tb = B - 1
  tp_pre = 0
  while(True):
    tp = (A*tb)//B - A*(tb//B)
    if tp > tp_pre:
      tp_pre = tp
    tb += B
    if tb > N:
      break
  if (B > N):
    print((A*N)//B - A*(N//B))
  else:
    print(int(tp_pre))
import math
A,B=map(int,input().split())

def lcm(x,y):
    return int((x*y)/math.gcd(x,y))

print(lcm(A,B))

### FIXED CODE ###

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

def lcm(x,y):
    return int((x*y)/fractions.gcd(x,y))

print(lcm(A,B))
import sys

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

sys.setrecursionlimit(N * 2)

Z = 1000000007

for _ in range(M):
    a = int(input())
    A.add(a)


B = [-1] * (N + 1)


def d(n):
    if n in A:
        B[n] = 0
        return 0

    if B[n] != -1:
        return B[n]

    if n == 1:
        return 1
    if n == 2:
        if 1 in A:
            return 1
        return 2

    if n - 1 in A and n - 2 in A:
        return 0

    if n - 1 in A:
        B[n] = d(n-2)
        return B[n]

    if n - 2 in A:
        B[n] = d(n-1)
        return B[n]

    B[n] = (d(n-2) + d(n-1)) % Z
    return B[n]


print(d(N))


### FIXED CODE ###

import sys

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

sys.setrecursionlimit(N * 10)

Z = 1000000007

for _ in range(M):
    a = int(input())
    A.add(a)


B = [-1] * (N + 1)
B[0] = 0


def d(n):
    if n < 1:
        return 0
    if n in A:
        B[n] = 0
        return 0

    if B[n] != -1:
        return B[n]
    if n == 1:
        return 1
    if n == 2:
        if 1 in A:
            return 1
        return 2

    if n - 1 in A and n - 2 in A:
        return 0

    if n - 1 in A:
        B[n] = d(n-2)
        return B[n]

    if n - 2 in A:
        B[n] = d(n-1)
        return B[n]

    B[n] = (d(n-2) + d(n-1)) % Z
    return B[n]


print(d(N))
print(input()[::int(input())-1])

### FIXED CODE ###

a = list(input())
b = int(input())
print("".join(a[::b]))
import math
n = int(input())
A = list(map(int, input().split()))
A = [A[i]-(i+1) for i in range(n)]
#print(A)
A.sort()
i = n/2
a,b = A[math.floor(i)], A[math.ceil(i)]
ans,ans1=0,0
for i in A:
    ans += abs(i-a)
    ans1 += abs(i-b)
print(min(ans,ans1))

### FIXED CODE ###

import math
n = int(input())
A = list(map(int, input().split()))
A = [A[i]-(i+1) for i in range(n)]
#print(A)
A.sort()
i = n/2
a = A[math.floor(i)]
b = A[math.ceil(i)] if i>1 else a
ans,ans1=0,0
for i in A:
    ans += abs(i-a)
    ans1 += abs(i-b)
print(min(ans,ans1))
lines = map(int, input().split())
lines.sort()

cnt =0
for i in range(len(lines)):
    cnt += lines[2-i]

print(cnt)



### FIXED CODE ###

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

# lines = list(map(int, "1 6 3".split()))
lines.sort()

cnt =0
for i in range(len(lines)):
    cnt += lines[2-i]

print(lines[2]-lines[1] + lines[1]-lines[0]  )