题目描述
problem
AOR Ika-chan, who loves feasts, defined "the number of feasts". A feast number is a natural number that includes "$ 51-3 $" in $ 10 $ decimal notation.
$? $ Can be any number from $ 0 $ to $ 9 $.
Find the number of feasts out of the natural numbers below $ N $.
input
$ N $
output
Output the number of feasts in one line. Also, output a line break at the end.
Example
Input
5124
Output
3
输入格式
见题面
输出格式
见题面
样例输入
5124
样例输出
3