from bisect import bisect_left


n,x=map(int,input().split())
nums=list(map(int,input().split()))

ix=bisect_left(nums,x)
count=-1

for i in range(ix,len(nums)):
    count+=1   
    if(nums[i]!=x):
        break
print(count)

e6bbe8f30a3103f8e66711ede79b166a1f40b279
<mask token>

<mask token>
for i in range(ix, len(nums)):
    count += 1
    if nums[i] != x:
        break
print(count)

<mask token>
n, x = map(int, input().split())
nums = list(map(int, input().split()))
ix = bisect_left(nums, x)
count = -1
for i in range(ix, len(nums)):
    count += 1
    if nums[i] != x:
        break
print(count)

from bisect import bisect_left
n, x = map(int, input().split())
nums = list(map(int, input().split()))
ix = bisect_left(nums, x)
count = -1
for i in range(ix, len(nums)):
    count += 1
    if nums[i] != x:
        break
print(count)

from bisect import bisect_left


n,x=map(int,input().split())
nums=list(map(int,input().split()))

ix=bisect_left(nums,x)
count=-1

for i in range(ix,len(nums)):
    count+=1   
    if(nums[i]!=x):
        break
print(count)
