读入 nnn (1≤n≤1000)(1\le n\le 1000)(1≤n≤1000),问最少几次乘除法可以从 xxx 得到 xnx^nxn,例如 x31x^{31}x31 需要6次:x2x^{2}x2 === x⋅xx\cdot xx⋅x,x4x^{4}x4 === x2⋅x^{2}\cdotx2⋅ x2,x^{2},x2, …,\dots ,…, x32x^{32}x32 === x16⋅x16,x^{16}\cdot x^{16},x16⋅x16, x31x^{31}x31 === x32÷xx^{32}÷xx32÷x
input 1:
1
output 1:
0
input 2:
91
output 2:
9
input 3:
811
output 3:
13