def solve(N,S):
	border = N
	for i in range(N):
		if(S[i]=='#'):
			border = i
			break
	counter = 0
	for i in range(border, N):
		if(S[i]=='.'):
			counter +=1
	return counter



if __name__ == '__main__':
	N = int(input())
	S = input()
	print(solve(N,S))