import re input() s=input().lstrip(".")[1:] print(len(s)+1+sum([max(0,i.count("#")-i.count("."))for i in re.findall("\.*#+",s)]))