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