#include <bits/stdc++.h>
int main() {
  int n, count = 0, i = 0, ans, flag = 1;
  char s[201];
  scanf("%d %s", &n, s);
  while (s[i] != '\0') {
    if (s[i] == 'x') count++;
    i++;
  }
  if (n / 2 > count) {
    ans = n / 2 - count;
    flag = 0;
  } else
    ans = count - n / 2;
  printf("%d\n", ans);
  i = 0;
  while (n-- && ans) {
    if (s[i] == 'x' && flag) {
      s[i] = 'X';
      ans--;
    } else if (s[i] == 'X' && !flag) {
      s[i] = 'x';
      ans--;
    }
    i++;
  }
  printf("%s\n", s);
  return 0;
}
