N=int(input()) #len(list)
list=list(input())
results=[0]
def count_str(list,num,str):
    count=0
    for i in range(num+1,len(list)):
        if list[i]==str:
            count+=1
    return count


a=0
for i in range(0,N):
    if list[i]=='#':
        results.append(count_str(list,i,'.'))

print(max(results))