#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
  string s;
  int n, ans = 0;
  cin >> n >> s;
  vector<bool> seen(n, true);
  int par = 0;
  for (int i = 0; i < n; i += 1) {
    if (i % 2 == par) {
      int curr = 0;
      while (i < n - 1 && s[i] == s[i + 1]) {
        seen[i] = false;
        curr += 1;
        i += 1;
        ans += 1;
      }
      if (curr % 2 == 1) {
        par ^= 1;
      }
    }
  }
  string ret = "";
  for (int i = 0; i < n; i += 1) {
    if (seen[i]) {
      ret += s[i];
    }
  }
  if ((int)ret.size() % 2 == 1) {
    ret.pop_back();
    ans += 1;
  }
  cout << ans << endl << ret;
}
