
if __name__ == '__main__':
    n = int(input())
    s = input()

    try:
        first_black = s.index('#')
    except ValueError as e:
        print(0)
        exit(0)

    s2 = s[first_black+1:]
    count = 0
    for c in s2:
        if c == '.':
            count += 1
    print(count)
