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

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