#include <bits/stdc++.h>
using namespace std;
int nx[] = {0, 1, 0, -1};
int ny[] = {0, 1, 0, -1};
int N;
int i, f_black, ans;
int main(void) {
  int count = 0;
  cin >> N;
  char S[N + 100];
  scanf("%s", S);
  for (i = 0; i < N - 1; i++) {
    if (S[i] == '#' && S[i] != S[i + 1]) {
      if (i == 0) {
        S[0] = '.';
        count++;
      } else if (S[i - 1] == S[i]) {
        S[i + 1] = '#';
        count++;
      } else {
        S[i] = '.';
        count++;
      }
    }
  }
  cout << S << "\n" << count << endl;
  return 0;
}
