n = int(input())
s = list(input())
cnt = [0,0] #[# .]
i=0
l=n-1

while(i<n and s[i] == "."):
	i+=1
print(i)
while(i<l and s[l] == "#"):
	l-=1
print(l)

for j in range(i,l+1):
	cnt[s[j] == "."] += 1
	
print(cnt)
print(min(cnt))