#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n == 1) {
    cout << 1 << "\n\n";
    return 0;
  }
  int op = 0;
  string ns = "";
  for (int i = 0; i < n; i++) {
    char nxt = s[i];
    char last = ns[ns.length() - 1];
    if (ns.length() % 2 == 0) {
      ns += nxt;
      continue;
    }
    if (last != nxt) {
      ns += nxt;
    } else {
      op++;
    }
  }
  if (ns.length() % 2 == 1) {
    ns.pop_back();
    op++;
  }
  cout << op << '\n' << ns << '\n';
  return 0;
}
