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

count = 0
lst = []
for i,char in enumerate(S):
  if (char == "."):
    lst.append(i)
    
length = len(lst)
if (length > 1):
  for idx, i in enumerate(lst):
    if (idx > 0):
      count += lst[idx] - lst[idx-1] -1 
      
min = 0
if (count > length):
  min = length
else:
  min = count
  
print(min)