import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main {
  public static void main(String[] args) throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      char[] cl = br.readLine().toCharArray();
      StringBuffer sb = new StringBuffer("");
      for (char c : cl){
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      }
      System.out.println(sb.toString());
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io class Main {
  public static void main(String[] args) throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      char[] cl = br.readLine().toCharArray();
      StringBuffer sb = new StringBuffer("");
      for (char c : cl){
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      }
      System.out.println(sb.toString());
  }
} Main public static void main(String[] args) throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      char[] cl = br.readLine().toCharArray();
      StringBuffer sb = new StringBuffer("");
      for (char c : cl){
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      }
      System.out.println(sb.toString());
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      char[] cl = br.readLine().toCharArray();
      StringBuffer sb = new StringBuffer("");
      for (char c : cl){
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      }
      System.out.println(sb.toString());
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] cl = br.readLine().toCharArray(); cl br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br StringBuffer sb = new StringBuffer(""); sb new StringBuffer("") for (char c : cl){
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      } char c cl {
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      } {
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      } if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        } c == '0' || c == '1' c == '0' c '0' c == '1' c '1' {
          sb.append(c);
        } sb.append(c) sb.append sb c {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        } if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          } !sb.toString().isEmpty() sb.toString().isEmpty() sb.toString().isEmpty sb.toString() sb.toString sb {
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          } sb.delete(sb.toString().length() - 1,sb.toString().length()) sb.delete sb sb.toString().length() - 1 sb.toString().length() sb.toString().length sb.toString() sb.toString sb 1 sb.toString().length() sb.toString().length sb.toString() sb.toString sb System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main {
  public static void main(String[] args) throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      char[] cl = br.readLine().toCharArray();
      StringBuffer sb = new StringBuffer("");
      for (char c : cl){
        if (c == '0' || c == '1' ) {
          sb.append(c);
        } else {
          if(!sb.toString().isEmpty()){
            sb.delete(sb.toString().length() - 1,sb.toString().length());
          }
        }
      }
      System.out.println(sb.toString());
  }
}