# -*- coding: utf-8 -*-
N = int(input())
S = str(input())
ans=0
chk=0
for i in range(N-1):
    if chk == 1:
        if S[i]==".":
            chk = 1
            ans = ans +1
        else:
            chk =1
    elif chk == 0:
        if S[i]==".":
            chk=0
        else:
            chk=1
print(ans)