#include <bits/stdc++.h>
using namespace std;
int N, ans;
string str;
int main() {
  cin >> N >> str;
  for (int i = 0; i + 1 < str.length(); i += 2)
    while (i + 1 < str.length() && str[i] == str[i + 1]) str.erase(i, 1), ans++;
  if (str.length() & 1) str.erase(str.length() - 1, 1), ans++;
  cout << ans << endl << str;
  return 0;
}
