#!/usr/bin/env python3

n = int(input())
s = input()

S =[]
for i in s:
    S.append(i)

w = 0
b = 0
an = n

for i in range(n-1,-1,-1):
    if i == "#":
        b += 1
    elif i == ".":
        w += 1

    if w > b:
        an = n-i

print(S)
print(i)

      


    
