# -*- coding: utf-8 -*-
n = int(input())
s = input()

cnt_start = False
cnt = 0

for c in s:
    if c == '.':
        cnt_start = True
        continue

    if not cnt_start:
        continue
    else:
        cnt += 1

print(cnt)
