408852: GYM103351 B A+B
Description
Medet loves adding numbers. But...
He does not actually know how to add numbers. Instead, he just glues them together. So, $$$7+12$$$ in Medet's mind is actually $$$712$$$ instead of $$$19$$$. $$$51+20$$$ is $$$5120$$$ for Medet instead of $$$71$$$. We're lucky Medet has this confusion only for addition. He can correctly evaluate all other expressions.
Recently, Medet has stumbled upon this problem:
"You are given a positive integer $$$n$$$. Count the number of pairs $$$(a, b)$$$ satisfying $$$1 \le a, b \le n$$$ such that $$$a + b$$$ is divisible by both $$$a$$$ and $$$b$$$."
To Medet's surprise, the problem was solved by a lot of participants. In fact, Medet was the only one among his friends who did not solve this problem. Do you understand why?
Now you are curious if Medet's interpretation of the problem is solvable.
InputThe input contains a single integer $$$n$$$ ($$$1 \le n \le 10^{16}$$$).
OutputThe output should contain a single integer — the number of desired pairs.
ExampleInput5Output
8Note
Some examples:
- $$$1 + 1 = 11$$$ is divisible by both $$$1$$$ and $$$1$$$.
- $$$2 + 4 = 24$$$ is divisible by both $$$2$$$ and $$$4$$$.
- $$$3 + 6 = 36$$$ is divisible by both $$$3$$$ and $$$6$$$.
- $$$2 + 8 = 28$$$ is divisible by $$$2$$$ but not divisible by $$$8$$$. Thus, we do not count this pair.