N = input()
S = input()
list_S = list(S)
N1 = 0
X = list_S.count('.')

if num == X:
    print('0')
else:
    for N in list_S:
        if list_S[N1] == '.':
            N1 += 1
        else:
            list_SS = list_S[N1:]
            X1 = list_SS.count('.')
            print(X1)
            break