import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		String keyBoard = sc.next();
		int inputSize = keyBoard.length();
		String output = "";

		for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		}

		System.out.println(output);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		String keyBoard = sc.next();
		int inputSize = keyBoard.length();
		String output = "";

		for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		}

		System.out.println(output);

		sc.close();
	}
} Main public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		String keyBoard = sc.next();
		int inputSize = keyBoard.length();
		String output = "";

		for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		}

		System.out.println(output);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		String keyBoard = sc.next();
		int inputSize = keyBoard.length();
		String output = "";

		for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		}

		System.out.println(output);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String keyBoard = sc.next(); keyBoard sc.next() sc.next sc int inputSize = keyBoard.length(); inputSize keyBoard.length() keyBoard.length keyBoard String output = ""; output "" for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		} int i = 0; int i = 0; i 0 i < inputSize i inputSize i++ i++ i {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		} {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		} String word = keyBoard.substring(i, i+1); word keyBoard.substring(i, i+1) keyBoard.substring keyBoard i i+1 i 1 if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			} word.equals("0") || word.equals("1") word.equals("0") word.equals word "0" word.equals("1") word.equals word "1" {
				output += word;
			} output += word output word {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			} if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				} !"".equals(output) "".equals(output) "".equals "" output {
					output = output.substring(0, output.length() - 1);
				} output = output.substring(0, output.length() - 1) output output.substring(0, output.length() - 1) output.substring output 0 output.length() - 1 output.length() output.length output 1 System.out.println(output) System.out.println System.out System System.out output sc.close() sc.close sc String args[] args public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		String keyBoard = sc.next();
		int inputSize = keyBoard.length();
		String output = "";

		for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		}

		System.out.println(output);

		sc.close();
	}
} public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		String keyBoard = sc.next();
		int inputSize = keyBoard.length();
		String output = "";

		for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		}

		System.out.println(output);

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		String keyBoard = sc.next();
		int inputSize = keyBoard.length();
		String output = "";

		for(int i = 0; i < inputSize; i++) {
			String word = keyBoard.substring(i, i+1);
			if (word.equals("0") || word.equals("1")) {
				output += word;
			} else {
				if (!"".equals(output)) {
					output = output.substring(0, output.length() - 1);
				}
			}
		}

		System.out.println(output);

		sc.close();
	}
}
