#include <bits/stdc++.h>
using namespace std;
int main() {
  char A[205];
  int N, down, up;
  down = up = 0;
  scanf("%d", &N);
  scanf("%s", A);
  for (int i = 0; i < strlen(A); i++) {
    if (islower(A[i]))
      down += 1;
    else
      up += 1;
  }
  if (down == up)
    printf("0\n%s\n", A);
  else {
    int idx = 0, cnt = 0;
    while (down != up) {
      if (down > up) {
        if (islower(A[idx])) {
          A[idx] = toupper(A[idx]);
          ++cnt;
          --down;
          ++up;
        }
      } else {
        if (isupper(A[idx])) {
          A[idx] = tolower(A[idx]);
          ++cnt;
          ++down;
          --up;
        }
      }
      ++idx;
    }
    printf("%d\n%s\n", cnt, A);
  }
}
