-module('Main').
-export([main/1]).

main(_) ->
    {ok, [N]} = io:fread("", "~d"),
    L = find_z_list(N),
    io:format("~p~n", [length(L)]),
    halt().


find_z_list(N) ->
    lists:reverse(find_z_list(N, 2, [])).
find_z_list(N, D, L) when N < D ->
    L;
find_z_list(N, D, L) when N >= D ->
    case N rem D == 0 of
        true ->
            find_z_list(N div D, D + 1, [D|L]);
        false ->
            find_z_list(N, D + 1, L)
    end.

