#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
bool solve() {
  int n;
  if (scanf("%d", &n) == EOF) return false;
  char h[201];
  scanf("%s", h);
  int cnt = 0, ans = 0;
  for (int i = 0; i < n; ++i) cnt += h[i] == 'x';
  if (2 * cnt < n) {
    for (int i = 0, c = cnt; i < n; ++i) {
      if (h[i] == 'X' && 2 * c < n) h[i] = 'x', c++, ans++;
    }
  } else {
    for (int i = 0, c = n - cnt; i < n; ++i) {
      if (h[i] == 'x' && 2 * c < n) h[i] = 'X', c++, ans++;
    }
  }
  printf("%d\n%s\n", ans, h);
  return true;
}
int main() {
  solve();
  return 0;
}
