# -*- coding: utf-8 -*-

n = int(input())

s = list(input())

count = 0

for i in range(n-1):
    if s[i] == '#' and s[i+1] == '.':
        if i == 0:
            s[0] = '.'
            count += 1
            continue

        if s[i-1] == '#':
            s[i+1] = '#'
            count += 1
        elif s[i-1] == '.':
                s[i] = '.'
                count += 13


print(count)


