#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
char s[maxn];
bool a[maxn];
int main() {
  int n;
  scanf("%d%s", &n, s + 1);
  int l = 1, p, ans = 0;
  while (l <= n) {
    a[l] = true;
    p = l + 1;
    if (s[p] == s[l]) {
      while (s[p] == s[l] && p <= n) ans++, p++;
      a[p] = true;
      l = p + 1;
    } else
      a[p] = true, l = p + 1;
  }
  if ((n - ans) & 1) {
    int i = n;
    while (!a[i]) i--;
    a[i] = false;
    ans++;
  }
  if (n == ans)
    printf("%d\n\n", ans);
  else {
    printf("%d\n", ans);
    for (int i = 1; i <= n; i++) {
      if (a[i]) printf("%c", s[i]);
    }
    printf("\n");
  }
  return 0;
}
