a = int(input())
b = input()

change = 0
ans = 0
for i in range(a):
  if(b[i] == '#' or change == 1):
    change = 0
    if(i + 1 >= a):
      break
    else:
      if(b[i+1] == '.'):
        ans += 1
        if(i+2 >= a):
          if(b[i+2] != '.'):change = 1
print(ans)