import java.util.Scanner;

public class ch1_6_3求解移动字符串问题 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		String s=in.next();
		int c=0;
		for(int i=0;i<s.length();i++) {
			if(s.charAt(i)=='*') {
				c++;
			}
		}
		for(int i=0;i<c;i++)
			System.out.print("*");
		s=s.replaceAll("[*]", "");
		System.out.println(s);
		System.out.println(c);
	}

}