n,m=map(int,input().split()) a=list(map(int,input().split())) s=input() stat=0 for o in s: if o=='L': stat+=1 if 0