N = int(input())
S = input()                                                                                                                                                                                                                                                                                                                                                                                                                                            
list_S = list(S)
N1 = 0

ans_list = []
for color in list_S:
    list_S1 = list_S[N1:]
    list_S2 = list_S[:N1]
    ans = list_S2.count('#') + list_S1.count('.')
    ans_list.append(ans)
    N1 += 1
ans_list.append(list_S.count("#"))
     
print(min(ans_list))