def main():
    N = int(input())
    S = input()
    first_black = -1
    for i, s in enumerate(S):
        if s == '.':
            pass
        else:
            first_black = i
            break
    sum = 0
    if 0 <= first_black < N-1:
        for i in range(first_black+1, N):
            if S[i] == '.':
                sum += 1
            else:
                pass
    else:
        pass
    print(sum)


if __name__ == '__main__':
    main()
