
from math import factorial




def        __UpperCamelCase					(    lowerCAmelCase__							:    int = 1_0_0  ):
 return sum(int(lowerCAmelCase__  ) for x in str(factorial(lowerCAmelCase__  )  )  )


if __name__ == "__main__":
      print(solution(int(input('Enter the Number: ').strip())))


def        __UpperCamelCase					(    lowerCAmelCase__							:    list[list[int | float]]  ):
 __a			:  int		    =  len(lowerCAmelCase__  )
 __a			:  Dict		    =  len(matrix[0]  )
 __a			:  Union[str, Any]		    =  min(lowerCAmelCase__  ,       lowerCAmelCase__  )

 for row in range(lowerCAmelCase__  ):
  # Check if diagonal element is not zero
  if matrix[row][row] != 0:
   # Eliminate all the elements below the diagonal
   for col in range(row + 1  ,       lowerCAmelCase__  ):
    __a			:  Dict		    =  matrix[col][row] / matrix[row][row]
    for i in range(lowerCAmelCase__  ,       lowerCAmelCase__  ):
     matrix[col][i] -= multiplier * matrix[row][i]
  else:
   # Find a non-zero diagonal element to swap rows
   __a			:  Optional[int]		    =  True
   for i in range(row + 1  ,       lowerCAmelCase__  ):
    if matrix[i][row] != 0:
     __a    ,	__a			:  Any		    =  matrix[i], matrix[row]
     __a			:  Union[str, Any]		    =  False
     break
   if reduce:
    rank -= 1
    for i in range(lowerCAmelCase__  ):
     __a			:  Optional[Any]		    =  matrix[i][rank]

            # Reduce the row pointer by one to stay on the same row
   row -= 1

 return rank


if __name__ == "__main__":
      import doctest

      doctest.testmod()
