#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int l;
  string s;
  cin >> n >> s;
  l = n;
  string a = "";
  for (int i = 0; i < n;) {
    if (i == n - 1) {
      a += s[i];
      break;
    }
    if (s[i] == s[i + 1]) {
      a += s[i];
      if (i + 2 >= n) break;
      for (int j = i + 2; j < n; j++) {
        if (j == n - 1) {
          if (s[i] != s[j]) a += s[j];
          i = n;
          break;
        }
        if (s[i] != s[j]) {
          a += s[j];
          i = j + 1;
          break;
        }
      }
    } else {
      a += s[i];
      a += s[i + 1];
      i += 2;
    }
  }
  int len = a.size();
  if (len % 2 == 1) len--;
  cout << n - len << endl;
  for (int i = 0; i < len; i++) cout << a[i];
  return 0;
}
