Mishka started participating in a programming contest. There are $n$ problems in the contest. Mishka's problem-solving skill is equal to $k$.

Mishka arranges all problems from the contest into a list. Because of his weird principles, Mishka only solves problems from one of the ends of the list. Every time, he chooses which end (left or right) he will solve the next problem from. Thus, each problem Mishka solves is either the leftmost or the rightmost problem in the list.

Mishka cannot solve a problem with difficulty greater than $k$. When Mishka solves the problem, it disappears from the list, so the length of the list decreases by $1$. Mishka stops when he is unable to solve any problem from any end of the list.

How many problems can Mishka solve?


-----Input-----

The first line of input contains two integers $n$ and $k$ ($1 \le n, k \le 100$) — the number of problems in the contest and Mishka's problem-solving skill.

The second line of input contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 100$), where $a_i$ is the difficulty of the $i$-th problem. The problems are given in order from the leftmost to the rightmost in the list.


-----Output-----

Print one integer — the maximum number of problems Mishka can solve.


-----Examples-----
Input
8 4
4 2 3 1 5 1 6 4

Output
5

Input
5 2
3 1 2 1 3

Output
0

Input
5 100
12 34 55 43 21

Output
5



-----Note-----

In the first example, Mishka can solve problems in the following order: $[4, 2, 3, 1, 5, 1, 6, 4] \rightarrow [2, 3, 1, 5, 1, 6, 4] \rightarrow [2, 3, 1, 5, 1, 6] \rightarrow [3, 1, 5, 1, 6] \rightarrow [1, 5, 1, 6] \rightarrow [5, 1, 6]$, so the number of solved problems will be equal to $5$.

In the second example, Mishka can't solve any problem because the difficulties of problems from both ends are greater than $k$.

In the third example, Mishka's solving skill is so amazing that he can solve all the problems.

Difficulty: introductory

Starter code:

Solutions:
input = __import__('sys').stdin.readline
MIS = lambda: map(int,input().split())

n, k = MIS()
prob = list(MIS())
while prob and prob[0] <= k: prob.pop(0)
while prob and prob[-1] <= k: prob.pop()
print(n - len(prob))

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

n, k = inp()
a = list(inp())
ans = 0
i = 0
while i != n and a[i] <= k:
    ans += 1
    i += 1
j = n - 1
while i < j and a[j] <= k:
    ans += 1
    j -= 1
print(ans)

n,k = list(map(int,input().split()))
ai = list(map(int,input().split()))
ans = 0
for i in range(n):
    if ai[i] > k:
        break
    ans += 1
for i in range(n-1,-1,-1):
    if ai[i] > k:
        break
    ans += 1
print(min(n,ans))


n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
ans = 0
while len(a) > 0 and a[0] <= k:
  ans += 1
  a = a[1:]
while len(a) > 0 and a[-1] <= k:
  ans += 1
  a = a[:-1]
print(ans)


n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
while len(a)!=0 and a[0]<=k: a.pop(0)
while len(a)!=0 and a[-1]<=k: a.pop()
print(n-len(a))
  

    

'''
////////////////      //////        ///////      //             ///////     //  //   //
////          //    ///   ///     ///    ///     //            ///  ///     ////     //
////    ////       ///     ///   ///      ///    //           /////////     ////     ///////
////     /////    ///       /// ///        ///   //          ///    ///     ////     //   //
//////////////     ///////////   ///////////     //////     ///     ///     //  //   //   //
'''



from collections import deque
n,k=map(int,input().split())
x=deque()
for j in map(int,input().split()):
  x.append(j)
while x:
  if x[0]<=k: x.popleft()
  else: break
while x:
  if x[-1]<=k: x.pop()
  else: break
print(n-len(x))

n,k=list(map(int, input().split() ) )
s=list(map(int, input().split() ) )
c=0
for i in range(n):
    if s[i]<=k:
        c+=1
    else:
        break
for i in range(n-c):
    if s[n-1-i]<=k:
        c+=1
    else:
        break
print(c)

n,k = input().split()
n = int(n)
k = int(k)
a = list(map(int,input().split()))
i = 0
count=0
while(i<n):
    if(a[i] <= k):
        count+=1
        i+=1
    else:
        break
j = n-1
while(j>i):
    if(a[j]<=k):
        count+=1
        j-=1
    else:
        break
print(count)

n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
k1=0;k2=0
for i in range(n):
    if a[i]<=k:
        k1+=1
    else:
        break
for i in range(n-1,-1,-1):
    if a[i]<=k:
        k2+=1
    else:
        break
print(min(k1+k2,n))


# ===================================
# (c) MidAndFeed aka ASilentVoice
# ===================================
# import math 
# import collections
# import string
# ===================================
n, k = [int(x) for x in input().split()]
q = [int(x) for x in input().split()]
l = 0
r = n-1
ans = 0
while(l <= r and (q[l] <= k or q[r] <=k)):
	if l == r:
		ans += 1
		break
	if q[l] <= k:
		ans += 1
		l += 1
	if q[r] <= k:
		ans += 1
		r -= 1

print(ans)

n,k=map(int,input().split())
ar=list(map(int,input().split()))
i=0
for x in ar:
    if(x>k):
        break
    i+=1
ans=i
for x in ar[::-1]:
    if(x>k):
        break
    ans+=1

ans=min(n,ans)
print(ans)

n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
ind1=-1
ind2=0
for i in range(n):
    if(a[i]>k):
        if(ind1==-1):
            ind1=i
        ind2=i
if(ind1==-1):
    print(n)
else:
    print(min(n,n-(ind2-ind1+1)))

n,k=(list(map(int,input().strip().split(' '))))
arr=list(map(int,input().strip().split(' ')))
cnt = 0
for i in range(n):
  if(arr[i]>k):
    cnt = 1
    break
if(cnt==0):
  print(n)
else:
  cnt = i
  for i in range(n-1,i-1,-1):
    if(arr[i]>k):
      break
    cnt+=1
  print(cnt)


n, k = map(int, input().split())
a = list(map(int, input().split()))
c = 0
while a and a[0] <= k:
    a.pop(0)
    c += 1
while a and a[-1] <= k:
    a.pop()
    c += 1
print(c)

n, k = map(int, input().split())
difficulties = list(map(int, input().split()))
solved = True
count = 0
left = 0
right = n - 1
while solved and left <= right:
    solved = False
    if difficulties[left] <= k:
        left += 1
        solved = True
        count += 1
    elif difficulties[right] <= k:
        right -= 1
        solved = True
        count += 1

print(count)

n,k = list(map(int,input().split()))
p = 0
a = list(map(int,input().split()))
q = [1]*n
for i in range(n):
    if a[i] > k:
        break
    elif q[i] != 0:
        q[i] = 0
        p+=1
for i in range(1,n+1):
    if a[-i] > k:
        break
    elif q[-i] != 0:
        q[-i] = 0
        p+=1
print(p)


import math;
import random;
import time;
import heapq;
def getIntList():
    return list(map(int, input().split()));
def getTransIntList(n):
    first=getIntList();
    m=len(first);
    result=[[0]*n for _ in range(m)];
    for i in range(m):
        result[i][0]=first[i];
    for j in range(1, n):
        curr=getIntList();
        for i in range(m):
            result[i][j]=curr[i];
    return result;
n, k = getIntList();
a = getIntList();
result=0;
for x in a:
    if x>k:
        break;
    result+=1;
if result<n:
    for x in a[::-1]:
        if x>k:
            break;
        result+=1;
print(result);

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
result = 0
while 1:
    if len(a)==0 or (a[0]>k and a[-1]>k):
        break
    if a[0]<=k:
        result += 1
        a.pop(0)
    elif a[-1]<=k:
        result += 1
        a.pop(-1)
print(result)


#-*-coding:utf-8 -*-

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

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

cnt = 0

L, R = 0, n - 1

while L < n and ls[L] <= m:
    L += 1
    cnt += 1

while R > L and ls[R] <= m:
    R -= 1
    cnt += 1

print(cnt)

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

cnt = 0
while True:
    if len(a)==0:
        break
    if a[0]<=k:
        cnt+=1
        a = a[1:]
        continue
    elif a[-1]<=k:
        cnt+=1
        a = a[:-1]
        continue
    else:
        break
print(cnt)


n, k = map(int, input().split())
arr = list(map(int, input().split()))
ans = 0
for i in range(n):
    if arr[i] <= k:
        ans += 1
    else:
        break
for i in range(n - 1, -1, -1):
    if arr[i] <= k:
        ans += 1
    else:
        break
print(min(n, ans))

import re
import math
import decimal
import bisect

def read():
	return input().strip()

def iread():
	return int(input().strip())

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

# code goes here
from collections import deque
n, k = viread()
d = deque(viread())
# print(d)
solved = 0
while len(d) != 0 and (d[0] <= k or d[-1] <= k):
	if d[0] <= k:
		d.popleft()
		solved += 1
	elif d[-1] <= k:
		d.pop()
		solved += 1
	# print(d)
print(solved)


n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
c = 0
for i in range(len(a)):
    if a[i] <= k:
        c += 1
    else:
        break
for i in range(len(a)-1, -1, -1):
    if a[i] <= k:
        c += 1
    else:
        break
print(min(c, len(a)))


n, k = list(map(int, input().split()))
lst = list(map(int, input().split()))
cnt = 0

while n and lst[0] <= k:
    lst.pop(0)
    n -= 1
    cnt += 1

while n and lst[n-1] <= k:
    lst.pop(n-1)
    n -= 1
    cnt += 1

print(cnt)