#include <bits/stdc++.h>
using namespace std;
char s[200100];
int main() {
  memset(s, 0, sizeof(s));
  int n, i, j;
  scanf("%d", &n);
  if (!n) {
    printf("0\n");
    return 0;
  }
  cin >> s;
  int ans = 0;
  for (i = 0; i < n;) {
    if (i == n - 1) {
      s[i] = '0';
      ans++;
      break;
    }
    if (s[i] != s[i + 1]) {
      i += 2;
      continue;
    } else {
      s[i] = '0';
      i++;
      ans++;
      int t = i;
      i++;
      int flag = 0;
      for (; i < n;) {
        if (s[t] != s[i]) {
          flag = 1;
          i++;
          break;
        }
        ans++;
        s[i] = '0';
        i++;
      }
      if (flag == 0) {
        s[t] = '0';
        ans++;
        break;
      }
    }
  }
  printf("%d\n", ans);
  for (i = 0; i < n; i++) {
    if (s[i] != '0') {
      printf("%c", s[i]);
    }
  }
  return 0;
}
