#include<iostream>
int main()
{
using std::cout;
using std::endl;
using std::cin;
char ch;
while (cin.get(ch))
{
if (ch != '$')
cout << ch;
else
{
cin.putback(ch);
break;
}
}
if (!cin.eof())
{
cin.get(ch);
cout << ch;
}
else
{
std::exit(0);
}
return 0;
}