#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<char> s(n);
  for (long long int i = 0; i < n; i++) {
    cin >> s[i];
  }
  long long int m = n;
  for (long long int i = 0; i < m - 1; i += 2) {
    if (s[i] == s[i + 1]) {
      s.erase(s.begin() + i + 1);
      i = i - 2;
      m--;
    }
  }
  if (m % 2 != 0) {
    m--;
  }
  cout << n - m << '\n';
  for (long long int i = 0; i < m; i++) {
    cout << s[i];
  }
}
