#include <bits/stdc++.h>
using namespace std;
map<int, bool> mapi;
vector<pair<int, int> > p;
long long mod = 1e9 + 7;
char sl = '\n';
template <class T, class U>
inline void checkmin(T &x, U y) {
  if (y < x) x = y;
}
template <class T, class U>
inline void checkmax(T &x, U y) {
  if (y > x) x = y;
}
int n = 0;
string s;
int main() {
  string res = "";
  cin >> n;
  cin >> s;
  int i = 0;
  int cont = 0;
  while (i < n) {
    res.push_back(s[i]);
    ++i;
    while (s[i] == res.back() && i < n) {
      ++cont;
      ++i;
    }
    if (i >= n) break;
    res.push_back(s[i]);
    ++i;
  }
  if (((int)res.size()) % 2) {
    res.pop_back();
    ++cont;
  }
  cout << cont << sl;
  cout << res << sl;
  return 0;
}
