import sys

N = int(sys.stdin.readline().strip())
S = sys.stdin.readline().strip()

first = S[0]
array = []
count = 0
tmp = first

for s in S:
    if tmp == "#" and s == ".":
        count += 1
print(count)