N=int(input())
S=input()
list1=[0]*N
for i in reversed(range(N)):
    if i==N-1 and S[i]==".":
        list1[i]+=1
    elif i==N-1:
        list1[i]=0
    elif S[i]==".":
        list1[i]=list1[i+1]+1
    else:
        list1[i]=list1[i+1]
print(list1)    
list2=[]
for i in range(N+1):
    if i==0:
        tmp=N-list1[0]
    elif i==N:
        tmp=list1[0]
    else:
        tmp=i-list1[0]+2*list1[i]
    print(tmp)
    list2.append(tmp)
print(min(list2))