PROGRAMMING:Convert string to decimal integer
Input a string ending with #, this problem requires filtering out all non hexadecimal characters (regardless of case), forming a new string representing hexadecimal number, and then converting it to decimal number for output. If the character '-' precedes the first hexadecimal character, the number is negative.
###Input format:
Enter a non empty string that ends with # on one line.
###Output format:
Output the converted decimal number on one line. Ensure that the output is in the long integer range.
###Input example:
```in
+-P-xf4+-1!#
```
###Output example:
```out
-3905
```
answer:If there is no answer, please comment
###Input format:
Enter a non empty string that ends with # on one line.
###Output format:
Output the converted decimal number on one line. Ensure that the output is in the long integer range.
###Input example:
```in
+-P-xf4+-1!#
```
###Output example:
```out
-3905
```
answer:If there is no answer, please comment