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