import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        }
        System.out.println(s);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        }
        System.out.println(s);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        }
        System.out.println(s);
    } main {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        }
        System.out.println(s);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String a = in.next(); a in.next() in.next in StringBuilder s = new StringBuilder(); s new StringBuilder() for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        } int i = 0; int i = 0; i 0 i < a.length() i a.length() a.length a i++ i++ i {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        } {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        } if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            } a.charAt(i)=='1' a.charAt(i) a.charAt a i '1' s.append(a.charAt(i)) s.append s a.charAt(i) a.charAt a i if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            } a.charAt(i)=='0' a.charAt(i) a.charAt a i '0' s.append(a.charAt(i)) s.append s a.charAt(i) a.charAt a i {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            } if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                } s.length()!=0 s.length() s.length s 0 {
                    s.deleteCharAt(s.length()-1);
                } s.deleteCharAt(s.length()-1) s.deleteCharAt s s.length()-1 s.length() s.length s 1 System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        }
        System.out.println(s);
    }
} public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        }
        System.out.println(s);
    }
} Main
import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.next();
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < a.length(); i++) {
            if(a.charAt(i)=='1')s.append(a.charAt(i));
            else if (a.charAt(i)=='0')s.append(a.charAt(i));
            else {
                if(s.length()!=0){
                    s.deleteCharAt(s.length()-1);
                }
            }
        }
        System.out.println(s);
    }
}
