n = int(input())
s = input()
s_list = list(s)
count1 = 0
count2 = 0

for i in range(n):
    if(s_list[i] == '#'):
        for j in range(0,n-1):
            #print(s_list[j+i])
            #print(j)
            if(s_list[j+i+1] == '.'):
                #print("count")
                count1 = count1 + 1
        break


for i in range(n):
    if(s_list[i] == '#'):
        count2 = count2 + 1


if(count1 < count2):
    print(count1)
else:
    print(count2)
