#include <bits/stdc++.h>
char s[222];
int main() {
  int n;
  scanf("%d %s", &n, s);
  int z = 0;
  for (int i = 0; i < n; ++i) z += s[i] == 'x';
  int k = (n >> 1) - z;
  printf("%d\n", abs(k));
  for (int i = 0; i < n; ++i)
    if (k < 0 && s[i] == 'x') {
      putchar('X');
      ++k;
    } else if (k > 0 && s[i] == 'X') {
      putchar('x');
      --k;
    } else {
      putchar(s[i]);
    }
}
