#include <bits/stdc++.h>
const long long lim = 1e5 + 5;
using namespace std;
vector<pair<long long, long long>> adj[lim], ans1;
double prob[lim];
bool vis[lim];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n;
  string s, ss = "";
  cin >> s;
  for (long long i = 0; i < (long long)s.size(); i += 2)
    if (s[i] == s[i + 1] && i < (long long)s.size() - 1) {
      k = i + 2;
      while (s[i] == s[k]) k++;
      if (k < (long long)s.size()) {
        ss += s[i];
        ss += s[k];
      }
      i = k - 1;
    } else if (i >= (long long)s.size() - 1)
      break;
    else {
      ss += s[i];
      ss += s[i + 1];
    }
  cout << (long long)s.size() - (long long)ss.size() << endl << ss;
}
