#include <bits/stdc++.h>
using namespace std;
int n, m;
char a[200022];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf(" %c", &a[i]);
  for (int i = 1; i <= n; i++) {
    if (m & 1 && a[i] == a[m]) continue;
    a[++m] = a[i];
  }
  if (m & 1) m--;
  printf("%d\n", n - m);
  a[m + 1] = '\000';
  printf("%s", a + 1);
}
