#include <iostream>
#include <regex>
#include <string>

using namespace std;

int main(int argc, char* argv[])
{
  string text = "\\left( 0 + 1 \\right)";
  text = regex_replace(text, regex(R"(\\(left(?=\()|right(?=\))))"), "");
  cout << text;
  return 0;
}