def main():
    N = int(input())
    S = input()
    if len(set(S)) == 1:
        return print(0)
    st = -1
    for i, s in enumerate(S):
        if s == "#":
            st = i
            break
    print(S[st:].count("."))


if __name__ == '__main__':
    main()
