n = input()
s = input()
s_list = list(s)
nmone = int(n) - 1
changednum = 0
for num in range(nmone):
  nump = num + 1
  if s_list[num] == "#" and s_list[nump] == ".":
    s_list[nump] = "#"
    changednum += 1
  else:
    pass
#sed = "".join(s_list)
print(changednum)