#include <bits/stdc++.h>
using namespace std;
int n;
string s;
char c;
int main() {
  cin >> n;
  int i;
  for (i = 1; i <= n; ++i) {
    cin >> c;
    if (s.size() % 2 == 0 || c != s.back()) s.push_back(c);
  }
  if (s.size() % 2 == 1) s.pop_back();
  cout << n - s.size() << '\n';
  cout << s << '\n';
  return 0;
}
