import sys
n = int(input())
s = input()

if all(c == s[0] for c in s):
    print(n)
    sys.exit()

cnt = 0
c_prev = s[0]
for c in s:
    if c_prev == '#' and c == '.':
        c_prev = '#'
        cnt += 1
    else:
        c_prev = c
print(cnt if cnt != 0 else n)
