function out = end89_slow(in)

while(in~=1 & in~=89)
    tmp = num2str(in);
    tmp = tmp - '0';
    tmp = sumsqr(tmp);
    in = tmp;
%    in = sumsqr(num2str(in) - '0');
end

if in==89
    out = true;
else
    out = false;
end

end