#include <bits/stdc++.h>
using namespace std;
string ans = "";
int ctr = 0;
int n;
string s;
void func() {
  if (n == 0) {
    return;
  }
  if (n == 1) {
    ctr++;
    return;
  }
  if (s[0] == s[1]) {
    s.erase(s.begin());
    n--;
    ctr++;
    func();
  } else {
    ans = ans + s[0];
    ans = ans + s[1];
    s.erase(s.begin());
    s.erase(s.begin());
    n = n - 2;
    func();
  }
}
int main() {
  int t;
  cin >> n;
  t = n;
  cin >> s;
  int i = 1;
  string ans = "";
  ans += s[0];
  while (i < n) {
    if (s[i] == s[i - 1]) {
      s.erase(s.begin() + i);
      n--;
    } else
      i += 2;
  }
  if (n % 2) {
    s.erase(s.begin() + n - 1);
    n--;
  }
  cout << t - n << endl << s;
  return 0;
}
