#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0, j = 0;
  for (int i = 0; i < n - 1; i++) {
    j = i;
    if (s[j] == s[j + 1]) {
      s[j + 1] = '-';
      ans++;
      j += 2;
      while (1) {
        if (s[j] == s[i]) {
          ans++;
          s[j] = '-';
          j++;
        } else
          break;
        if (j >= n) break;
      }
    }
    if (i == j)
      i += 1;
    else
      i = j;
  }
  if ((s.size() - ans) % 2 == 1) {
    ans++;
  }
  cout << ans << endl;
  string s1 = "";
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '-') s1 += s[i];
  }
  if (s1.size() % 2 == 1) s1.erase(s1.size() - 1, 1);
  cout << s1 << endl;
  return 0;
}
