#3224. Semi-prime H-numbers

Semi-prime H-numbers

说明

输入格式

输入可能有很多行,且一定以一个数字 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow></semantics></math>0 结尾。

除了最后一行 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow></semantics></math>0 之外,其余每一行都为一个 H 数 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi></mrow></semantics></math>n

输出格式

对于每一行,输出对应询问的结果。

样例

21 
85
789
0
0
5
62

提示

对于 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>100</mn><mi mathvariant="normal">%</mi></mrow></semantics></math>100% 的数据,保证 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi><mo>≤</mo><mn>1</mn><msup><mn>0</mn><mn>6</mn></msup><mo>+</mo><mn>1</mn></mrow></semantics></math>n106+1