/*
*/
package compresio12n;
import java.util.Scanner;
/**
*
* @author Miro Petsalo
*/
public class Compresio12n {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String c = s.nextLine();
int nb2 =c.length();
String answer ="";
while (nb2>0) {
int i=0;
String d[] = c.split("(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)");
int h=d[i].length();
int x = Integer.parseInt(d[0]);
c=c.substring(h);
while(x>0){
answer = answer+d[i+1];
x=x-1;
}
String d1[] = c.split("(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)");
int h1=d[i+1].length();
c=c.substring(h1);
nb2 =c.length();
}
System.out.println(answer);
}
}