#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long n, i = 0, j, c = 0;
  cin >> n;
  string s;
  cin >> s;
  while (i < n) {
    j = i;
    if (s[i] == s[i + 1] && i + 1 < n) {
      j = i + 1;
      while (s[i] == s[j] && j < n) {
        s[j] = '.';
        j++;
        c++;
      }
      j--;
    }
    i = j + 2;
  }
  if ((n - c) % 2) {
    c++;
  }
  cout << c << '\n';
  j = 0;
  for (i = 0; i < n && j < n - c; i++) {
    if (s[i] != '.') {
      cout << s[i];
      j++;
    }
  }
  return 0;
}
