{"raw_statement":[{"iden":"problem statement","content":"For a positive integer $n$, we denote the integer obtained by reversing the decimal notation of $n$ (without leading zeroes) by $rev(n)$. For example, $rev(123) = 321$ and $rev(4000) = 4$.\nYou are given a positive integer $D$. How many positive integers $N$ satisfy $rev(N) = N + D$?"},{"iden":"constraints","content":"*   $D$ is an integer.\n*   $1 ≤ D < 10^9$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$D$"},{"iden":"sample input 1","content":"63"},{"iden":"sample output 1","content":"2\n\nThere are two positive integers $N$ such that $rev(N) = N + 63$: $N = 18$ and $29$."},{"iden":"sample input 2","content":"75"},{"iden":"sample output 2","content":"0\n\nThere are no positive integers $N$ such that $rev(N) = N + 75$."},{"iden":"sample input 3","content":"864197532"},{"iden":"sample output 3","content":"1920"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}