N = int(input())
s = input()
S = [str(c) for c in s]

cnt1 = 0; #　.の数
cnt2 = 0;#　#の数

for i in range(N):
    if str(S[i]) != ".":
        cnt1 += 1
    else:
        cnt2 += 1

if cnt1 >= cnt2:
    print(cnt2)
else:
    print(cnt1)