N = int(input())
S = input()

# 単色のみの場合
if '.' not in S:
    print(0)
    exit()
elif '#' not in S:
    print(0)
    exit()

# それ以外
first_black = 0
white_count = 0
for i in range(N):
    if (S[i] == '.'):
        white_count += 1
    else:
        first_black = i
        break

remain_white = 0
for j in range(first_black, N):
    if S[j] == '.':
        remain_white += 1

print(remain_white)
