num = int(input())
a = input()
count = 0
for i in range(num):
  if i < num-2:
    if a[i] == "#" and a[i+1] == ".":
      count += 1
      a = a[:i+1] + "#" + a[i+2:]  
  elif i == num-2:
    if a[i] == "#" and a[i+1] == ".":
      count += 1
      a = a[:i+1] + "#"
print(count)