#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt = 0;
  string res = "";
  for (int i = 0; i < n;) {
    if (i + 1 < n and s[i] != s[i + 1]) {
      res += s.substr(i, 2);
      i += 2;
    } else {
      cnt++;
      i += 1;
    }
  }
  cout << cnt << "\n";
  cout << res;
}
