N = int(input())
S = input()
 
count = 0
lst = []
for i,char in enumerate(S):
  if (char == "."):
    lst.append(i)

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