###
#main
if __name__ == "__main__":
    N = int(input())
    S = input()
    keepColor = False # True: need to change w -> b
    count = 0
    for t in S:
        if t == "#":
            keepColor = True
        if keepColor and t == ".":
            count += 1
    print(count)
    