
def resolve():
    N = int(input())
    S = input()

    pre = ""
    cnt = 0
    for s in S:
        if pre == "#":
            if s == ".":
                cnt += 1
                pre = "#"
                continue
        else:
            pre = s

    print(cnt)


if __name__ == "__main__":
    resolve()