#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long power(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret *= a;
    a *= a;
    if (ret >= MOD) ret %= MOD;
    if (a >= MOD) a %= MOD;
    b >>= 1;
  }
  return ret;
}
long long invmod(long long x) { return power(x, MOD - 2); }
const long long N = 3e5 + 5;
long long gcd(long long a, long long b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
int32_t main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  map<long long, long long> mp;
  if (n == 1) {
    cout << "1" << endl;
    cout << endl;
    return 0;
  }
  for (long long i = 0; i < n; i++) {
    mp[s[i] - 'a']++;
  }
  if (mp.size() == 1) {
    cout << n << endl;
    cout << endl;
    return 0;
  }
  vector<long long> vp;
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    long long k = i;
    long long count = 0;
    while (s[i] == s[k] && k < n) {
      k++;
      count++;
    }
    ans += count - 1;
    if (k < n) {
      vp.push_back(s[i] - 'a');
      vp.push_back(s[k] - 'a');
    }
    i = k;
  }
  cout << n - vp.size() << endl;
  for (long long i = 0; i < vp.size(); i++) {
    cout << char(vp[i] + 97);
  }
  cout << endl;
}
