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