#include<stdio.h>
int rec(int a[],int low,int high){
if(low>=high)
return a[low]==42?1:0;
else
return rec(a,low,(low+high)/2)+rec(a,(low+high)/2+1,high);
}
int main(){
int n;
printf("Enter the value to be found:",n);
scanf("%d",&n);
int size;
scanf("%d",&size);
int a[size];
for(int i=0;i<size;i++)scanf("%d",&a[i]);
int ans=rec(a,0,size);
printf("%d\n",ans);
}
I2luY2x1ZGU8c3RkaW8uaD4KCmludCByZWMoaW50IGFbXSxpbnQgbG93LGludCBoaWdoKXsKCWlmKGxvdz49aGlnaCkKCXJldHVybiBhW2xvd109PTQyPzE6MDsKCWVsc2UKCXJldHVybiByZWMoYSxsb3csKGxvdytoaWdoKS8yKStyZWMoYSwobG93K2hpZ2gpLzIrMSxoaWdoKTsKfQppbnQgbWFpbigpewoJaW50IG47CglwcmludGYoIkVudGVyIHRoZSB2YWx1ZSB0byBiZSBmb3VuZDoiLG4pOwoJc2NhbmYoIiVkIiwmbik7CglpbnQgc2l6ZTsKCXNjYW5mKCIlZCIsJnNpemUpOwoJaW50IGFbc2l6ZV07Cglmb3IoaW50IGk9MDtpPHNpemU7aSsrKXNjYW5mKCIlZCIsJmFbaV0pOwoJaW50IGFucz1yZWMoYSwwLHNpemUpOwogICAgcHJpbnRmKCIlZFxuIixhbnMpOwp9