Problem1817--四位数的差

1817: 四位数的差

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 16 MiB

Description

输入一个四位数,将这个数各位数字倒序合成一个新数,输出原数和新数的差。

Input

一行,一个整数。

Output

一行,一个整数。

Sample Input Copy

4321

Sample Output Copy

3087

Source/Category