read -d\ a z="Wait, that's not a number..." for((b=10#${a:?},z=0,i=a+199999?2:-a;b%i?b/++i:(z+=a/i,b/=i);)){ : } echo $z . *