import java.util.*;
import java.util.regex.Pattern;
public class Pakkaus {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String input = scanner.nextLine();
int kerroin = 0;
String kerrattava = "";
for (int i=0; i<input.length(); i++) {
String c = input.substring(i, i+1);
if (c.equals("0") ||
c.equals("1") ||
c.equals("2") ||
c.equals("3") ||
c.equals("4") ||
c.equals("5") ||
c.equals("6") ||
c.equals("7") ||
c.equals("8") ||
c.equals("9") || ) {
if (!kerrattava.isEmpty()) {
while (kerroin > 0) {
System.out.print(kerrattava);
kerroin--;
}
kerrattava = "";
kerroin = Integer.valueOf(c);
} else {
kerroin = kerroin*10 + Integer.valueOf(c);
}
} else {
kerrattava = kerrattava + c;
}
}
while (kerroin > 0) {
System.out.print(kerrattava);
kerroin--;
}
}
}