-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(1, _D, L) ->
    L;
find_z_list(N, D, L) ->
    case N rem D == 0 of
        true ->
            case (N div D) == D of
                true ->
                    find_z_list(1, D + 1, [D|L]);
                false ->
                    find_z_list(N div D, D + 1, [D|L])
            end;
        false ->
            find_z_list(N, D + 1, L)
    end.

