#include <bits/stdc++.h>
const double eps = 1e-6;
using namespace std;
int n, m, l, r;
list<char> s;
char c[200550];
int main(void) {
  cin >> n;
  cin >> c;
  int cnt = 0;
  for (int i = 0; i < n; i += 2) {
    if (i + 1 < n && c[i] == c[i + 1]) {
      int k = i + 1;
      while (k < n && c[i] == c[k]) {
        c[k] = '&';
        ++k;
        ++cnt;
      }
      i = k - 1;
    }
  }
  int cd = n - cnt;
  if ((n - cnt) % 2 == 1) {
    --cd;
    ++cnt;
  }
  cout << cnt << endl;
  for (int i = 0; i < n; ++i) {
    if (c[i] != '&' && cd != 0) {
      cout << c[i];
      --cd;
    }
  }
  cout << endl;
  return 0;
}
