#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys

input = sys.stdin.readline
N = int(input())
S = input()
a = 0

for i in range(N):
    if i == N - 1 and S[N - 1] == '.':
        break
    elif i == N:
        break
    if S[i] == '#' and S[i + 1] == '.':
        a += 1

print(a)
