#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k;
  string s, a;
  cin >> n;
  cin >> s;
  a = "";
  j = 0;
  for (i = 0; i < n; i++) {
    if (j % 2 == 0) {
      a += s[i];
      j++;
    } else if (a[j - 1] != s[i]) {
      a += s[i];
      j++;
    }
  }
  if (j % 2 != 0) j--;
  cout << n - j << endl;
  for (i = 0; i < j; i++) cout << a[i];
  cout << endl;
  return 0;
}
