import numpy as np
# 文字列の入力
N = int(input())
S_tmp = np.array(list(input()))
S=[]
for i in S_tmp:
    if i == ".":
        S.append(True)
    else:
        S.append(False)
minimum = []
for i in range(0,len(S)+1):
    str1 = [True]*i
    str2 = [False]*(len(S)-i)
    str3 = str1 + str2
    str3 = np.array(str3)
    x = str3==S
    minimum.append(np.sum(x==False))
print(np.min(minimum))