#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, count = 0;
  cin >> n;
  string s, s1 = "";
  cin >> s;
  if (n == 1) {
    cout << n;
  } else {
    for (int i = s.length() - 1; i >= 1; i--) {
      if (s[i] == s[i - 1]) {
        while (s[i] == s[i - 1]) {
          count++;
          i--;
        }
        if (i <= 0)
          count++;
        else
          i++;
      } else {
        s1 += s[i];
        s1 += s[i - 1];
        i--;
      }
    }
    reverse(s1.begin(), s1.end());
    if (count == 0 && n % 2 != 0) count = 1;
    cout << count << "\n";
    cout << s1;
  }
  return 0;
}
