def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def zeros(n): return [0]*n

class Debug():
    def __init__(self):
        self.debug = True
 
    def off(self):
        self.debug = False
 
    def dmp(self, x, cmt=''):
        if self.debug:
            if cmt != '':
                w = cmt + ': ' + str(x)
            else:
                w = str(x)
            print(w)
        return x

def prob():
    d = Debug()
    d.off()
    N = getInt()
    S = input()
    d.dmp((N, S),'N, S')
    count = 0
    i = 0
    while i < N and S[i] != '#':
        i += 1
    while i < N:
        if S[i] == '.':
            count += 1
        i += 1
        
    return count

ans = prob()
print(ans)