文件目录

#include <iostream>
using namespace std;
int main()
{
    string s;
    cin >> s;
    char c = s[0];
    int n = 1;
    for (int i = 1; s[i]; i++)
    {
        if (s[i] == c)
            n++;
        else
        {
            cout << n << c;
            c = s[i];
            n = 1;
        }
    }
    cout << n << c;
    return 0;
}