4830 - 数位动态-排除4

计算0<n<10^12内数字位数上不包含4的个数

Input

输入n

Output

输出一个整数

Examples

Input

10

Output

10

Input

100

Output

82

Hint

数据规模 n在int范围内

Time Limit 1 second
Memory Limit 512 MB
Discuss Stats
上一题 下一题