#!/usr/bin/python
# coding: UTF-8

def check(n,s):
    for i in range(1,n):
        if s[i-1] == "#" and s[i] == ".":
            return False
    return True

def exe(n,s,count):
    if check(n,s):
        return count
    for i in range(1,n):
        if s[i-1] == "#" and s[i] == ".":
            return exe(n-2,s[0:i-1]+s[i+1:],count+1)
N = int(input())
S = input()

print(exe(N,S,0))