#include<bits/stdc++.h>
using namespace std;
string st;
long long len;
int main()
{
cin>>st;
len=st.size();
for(int i=0;i<len;i++)
{
if(st[i]>='0'&&st[i]<='9')
{
for(int j=1;j<int(st[i]);j++)
{
cout<<st[i-1];
}
continue;
}
else
{
cout<<st[i];
}
}
return 0;
}