{"raw_statement":[{"iden":"problem statement","content":"You are given an integer $N$. Among the integers between $1$ and $N$ (inclusive), how many _Shichi-Go-San numbers_ (literally \"Seven-Five-Three numbers\") are there?\nHere, a Shichi-Go-San number is a positive integer that satisfies the following condition:\n\n*   When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear."},{"iden":"constraints","content":"*   $1 \\leq N < 10^9$\n*   $N$ is an integer."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"575"},{"iden":"sample output 1","content":"4\n\nThere are four Shichi-Go-San numbers not greater than $575$: $357, 375, 537$ and $573$."},{"iden":"sample input 2","content":"3600"},{"iden":"sample output 2","content":"13\n\nThere are $13$ Shichi-Go-San numbers not greater than $3600$: the above four numbers, $735, 753, 3357, 3375, 3537, 3557, 3573, 3575$ and $3577$."},{"iden":"sample input 3","content":"999999999"},{"iden":"sample output 3","content":"26484"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}