#include <bits/stdc++.h>
using namespace std;
int main() {
  int N = 0;
  string S;
  cin >> N >> S;
  int cnt = 0;
  string checkS;
  for (int i = 0; i < N - 1; i++) {
    checkS = S.substr(i, 3);
    if (checkS == "...") {
    } else if (checkS == "..#") {
    } else if (checkS == ".#.") {
      cnt++;
      S.replace(i, 3, "...");
    } else if (checkS == "#..") {
      cnt++;
      S.replace(i, 3, "...");
    } else if (checkS == "##.") {
      cnt++;
      S.replace(i, 3, "...");
    } else if (checkS == ".##") {
    } else if (checkS == "#.#") {
      cnt++;
      S.replace(i, 3, "...");
    } else if (checkS == "###") {
    }
  }
  cout << S << endl;
  cout << cnt << endl;
}
