spoj problem

17504. Run length encoding