import sys
a = []
for l in sys.stdin:
    a.append(l)

num = int(a[0])
haichi = a[1]
prev_haichi = '.'
count = 0
for i in range(num):
    each_haichi = haichi[i]
    if prev_haichi == '#' and each_haichi == '.':
        count += 1
        prev_haichi = '#'
    else:
        prev_haichi = each_haichi
print(count)
