import sys

input = sys.stdin.readline


def main():
    N = int(input())
    S = input().rstrip()

    ans = 0
    for i in range(N):
        if S[i] == "#":
            ans = S[i + 1:].count(".")
            break

    print(ans)


if __name__ == "__main__":
    main()
