#include <bits/stdc++.h>
using namespace std;
int n;
int dp[200005][27];
pair<int, int> go[200005][27];
char s[200005];
void update(int i, int x, int y) {
  int v = dp[i][x], j = 0;
  if (x != 0 && y != 0 && x == y) return;
  if (x != 0 && y != 0) j = 0, v += 2;
  if (x != 0 && y == 0) j = x;
  if (x == 0 && y != 0) j = y;
  if (dp[i + 1][j] < v) {
    dp[i + 1][j] = v;
    go[i + 1][j] = pair<int, int>(x, y);
  }
}
void output(int i, int j) {
  if (i > 0) output(i - 1, go[i][j].first);
  int x = go[i][j].first;
  int y = go[i][j].second;
  if (x != 0 && y != 0) printf("%c%c", x + 'a' - 1, y + 'a' - 1);
}
int main() {
  memset(dp, 192, sizeof(dp));
  dp[0][0] = 0;
  scanf("%d%s", &n, s);
  for (int i = 0; i < n; i++) {
    int y = s[i] - 'a' + 1;
    for (int x = 0; x <= 26; x++) {
      update(i, x, y);
      update(i, x, 0);
    }
  }
  int ans = 0, src = 0;
  for (int x = 0; x <= 26; x++) {
    if (dp[n][x] > ans) {
      ans = dp[n][x];
      src = x;
    }
  }
  printf("%d\n", n - ans);
  output(n, src);
}
