#include <bits/stdc++.h>
using namespace std;
char a[200005];
char input;
int flag = 1;
int n;
int ans = 0;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> input;
    if (flag == 1) {
      a[ans] = input;
      ans++;
      flag = 0;
    }
    if (flag == 0) {
      if (input == a[ans - 1])
        continue;
      else {
        a[ans] = input;
        ans++;
        flag = 1;
      }
    }
  }
  if (ans % 2 == 1) ans -= 1;
  cout << n - ans << endl;
  for (int i = 0; i < ans; i++) cout << a[i];
  return 0;
}
