# -*- coding: utf-8 -*-
n = int(input())
S = input()

def count(S, k):
    if k == 1:
        return 0
    if S[k - 1] == '.' and S[k - 2] == '#':
        S1 = []
        S2 = []
        for i in range(len(S)):
            if i == k - 1:
                continue
            if i == k - 2:
                S1.append('.')
                S2.append('#')
            else:
                S1.append(S[i])
                S2.append(S[i])
            
        T = ['.' if i == k - 2 else S[i] for i  in range(0, k + 1)]
        return count(T, k - 1) + 1
    else:
        return count(S, k - 1)

print(count(S, n))