      MODULE primeFactorizationMod
! 素因数分解のためのモジュール．
! O( sqrt(N) )
      implicit none
      integer, parameter, private :: p = 8
      
      contains
! 整数Nを受け取り，素因数分解の結果をfact,powに
! 昇順で割り付け配列として格納して返すサブルーチン．
! N>=2
      subroutine primeFactorization( n,fact,pow )
        implicit none
        integer(p),intent(in) :: n
        integer(p),allocatable,intent(out) :: fact(:), pow(:)
        integer(p),allocatable :: fBuffer(:), pBuffer(:)
        integer(p) :: nn, i, iEnd, cnt
        
        
        if( n<=1 )then
          fact = [0];pow = [0]
        end if
        
        iEnd = ceiling( sqrt(real(n)) )
        allocate( fBuffer(iEnd), pBuffer(iEnd), source=0_p )
        
        nn  = n
        cnt = 0
        do i = 2,iEnd
          if( mod(nn,i)/=0 ) cycle
          
          cnt = cnt + 1
          fBuffer(cnt) = i
          do while( .true. )
            nn = nn / i
            pBuffer(cnt) = pBuffer(cnt) + 1
            if( mod(nn,i)/=0 ) exit
          end do
        end do
        
        if( nn/=1 )then
          cnt = cnt + 1
          fBuffer(cnt) = nn
          pBuffer(cnt) = 1
        end if
        
        if( .not.allocated(fact) ) allocate( fact(cnt) )
        if( .not.allocated(pow ) ) allocate( pow(cnt ) )
        
        fact(1:cnt) = fBuffer(1:cnt)
        pow(1:cnt ) = pBuffer(1:cnt)
        
      end subroutine
      END MODULE primeFactorizationMod
      
! Procedure List
! primeFactorization( int(in)::n, int(out),alloc::fact,pow )
      
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


      PROGRAM piyo
      use primeFactorizationMod
      IMPLICIT NONE
      INTEGER,PARAMETER :: prec = 8
      integer(prec) :: n, ans=0
      integer(prec),allocatable :: fact(:),pow(:)
      integer(prec) :: lenF, i,e
      read*,n
      
      call primeFactorization( n,fact,pow )
      
      lenF = size( fact )
      
      do i = 1,lenF
        e = 1
        do while( .true. )
          
          if( pow(i)<e ) exit
          
          ans = ans + 1
          pow(i) = pow(i) - e
          e = e + 1
        end do
      end do
      
      print*,ans
      
   !   print*,fact
   !   print*,pow
      
      END PROGRAM