char s[9999];i,t;main(n){for(gets(s+scanf("%*d%d ",&i)),n=s[i]&1;t-1+n*2;t+=s[n?--i:++i]*2-81);t=!printf("%d",i);}