#!/usr/bin/env python3

# @date Time-stamp: <2019-04-20 22:14:10 tagashira>
# @file a.cpp
# @brief https://tenka1-2019-beginner.contest.atcoder.jp/tasks/tenka1_2019_c

N = int(input())
S = str(input())

# print(S.replace("#.","!!"))
output =0
for char in S.replace("#.","!"):
  if char == "!":
    output +=1

print(int(output))
