program main
 
  implicit none
 
  integer :: l 
  integer :: i,j,v 
  
  read(*,*) l
  
  v = 0 
  do i = 1, l 
    do j = 1, l-i
      if ( i*j*(l-i-j) > v ) then
        v = i*j*(l-i-j)
      end if
    end do
  end do

  print*, v
  
end program main
