Harmony Pairs
题号:NC209784
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Roundgod is obsessive about numbers. Let  be the sum of the digits of in decimal notation,  is a harmony pair if and only if . Roundgod is given , and she wants to count the number of harmony pairs modulo  satisfying .

输入描述:

The only line of input contains one integer .

输出描述:

Output one integer indicating the answer.
示例1

输入

复制
100

输出

复制
967