from sys import stdin
N = int(stdin.readline().rstrip())
ans = stdin.readline().rstrip()
count = 0
list = ans.split("#")
if len(list) == 1:
    print(0)
    exit()
for itr in list:
    if itr:
        count += 1
print(count)
