stones = [raw_input() for i in range(2)][1]
if "#" not in stones:
    print 0
else:
    counter = 0
    for ind, i in enumerate(stones, start=1):
        if i == "#":
            break
    for i in stones[ind:]:
        if i == ".":
            counter += 1
    print(counter)
