#include <bits/stdc++.h>
using namespace std;
int n, ans = 0;
char s[(200000 + 500)];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    ans++;
    cin >> s[ans];
    if (i < n) {
      ans++;
      cin >> s[ans];
    }
    i++;
    while (s[ans] == s[ans - 1] && i < n) {
      i++;
      cin >> s[ans];
    }
  }
  while (s[ans] == s[ans - 1]) ans--;
  if (ans % 2) ans--;
  cout << n - ans << endl;
  for (int i = 1; i <= ans; ++i) cout << s[i];
  cout << endl;
  return 0;
}
