N = int(input())
S = list(input())

kurodeta = False
cnt = 0
for stone in S:
    if not kurodeta and stone == ".":
        continue

    if stone == "#":
        kurodeta = True

    if stone == ".":
        cnt += 1

print(cnt)
