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

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