N=int(input()) #len(list)
list=list(input())
results=[0]
def count_str(list,num,str):
    newlist=list[num+1:]
    return(newlist.count(str))

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

print(max(results))