N = int(input())
S = str(input())
white = '.'
black = '#'

cnt = 0
for i in S:
    if(i==black):
        break
    else:
        cnt += 1
#print(cnt)
#print(S)
S = S[cnt:]
#print(S)
chg_cnt = 0
for i in S:
    if(i==white):
        chg_cnt += 1
print(chg_cnt)