#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
using ll = long long;
const int MAX_N = 200 * 1000 + 5;
char a[MAX_N];
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", a);
  char prev_ch = 0;
  int answer = 0;
  string s_print;
  for (int i = 0; i < n; ++i) {
    if (a[i] == prev_ch) {
      ++answer;
    } else {
      s_print += a[i];
      if (prev_ch == 0) {
        prev_ch = a[i];
      } else {
        prev_ch = 0;
      }
    }
  }
  if (prev_ch) {
    s_print.pop_back();
    ++answer;
  }
  printf("%d\n", answer);
  printf("%s\n", s_print.c_str());
}
