#include <bits/stdc++.h>
using namespace std;
void SieveOfEratosthenes(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++)
    if (prime[p]) cout << p << " ";
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, i, j;
  cin >> n;
  string s, s1;
  cin >> s;
  vector<pair<char, long long int> > pp;
  long long int cnt = 0, x = 1;
  int flg = 0;
  long long int hergfswetwrgerge;
  pp.push_back({s[0], 1});
  long long int fhergswdgrsdfrsg;
  for (i = 1; i < n; i++) {
    if (pp.back().first == s[i]) {
      pp.back().second += 1;
    } else
      pp.push_back({s[i], 1});
  }
  long long int cvhtyiuiggdfgg;
  for (i = 0; i < pp.size(); i++) {
    long long int cvhrfasfwfsd;
    s1 += pp[i].first;
    if (s1.size() % 2 == 0) {
      long long int vbppgpergperp;
      if (pp[i].second > 1) {
        s1 += pp[i].first;
      }
    }
  }
  if (s1.size() & 1) s1.pop_back();
  long long int cvhefsdwfdsfvergr;
  cout << n - s1.size() << '\n';
  cout << s1;
  return 0;
}
