#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
typedef struct NodeType
{
int data;
int length;
}NodeType;
NodeType seqlist[100];
int cmp(NodeType a,NodeType b)
{
return a.data<b.data;
}
int seqSearch(NodeType seqlist[],int n,int k)
{
int i;
seqlist[0].data = k;
for(i = n; seqlist[i].data!=k; i--);
return i;
}
int binSearch(NodeType seqlist[],int n,int k)
{
int left = 1;
int right = n;
while(left<=right)
{
int mid = (left+right)/2;
if(seqlist[mid].data>k)
{
right = mid-1;
}
else if(seqlist[mid].data<k)
{
left = mid+1;
}
else
{
return mid;
}
}
return 0;
}
int main()
{
int n;
cin>>n;
int k;
cin>>k;
for(int i = 1; i <= n; i++)
{
cin>>seqlist[i].data;
}
sort(seqlist+1,seqlist+n+1,cmp);
/*for(int i=1;i<=n;i++)
{
cout<<seqlist[i].data<<endl;
}*/
cout<<"seqSearch"<<endl;
cout<<seqSearch(seqlist,n,k)<<endl;
cout<<"binSearch"<<endl;
cout<<binSearch(seqlist,n,k)<<endl;
return 0;
}