I cant figure out how to simplify the following equation, but have been told it is possible:

ln(sum(e^(theta*z)))

In this case z is a discrete random variable that only takes on values of 1 or 0 because it comes from a bernoulli distribution. Theta is a value that will later become maximized. How can I simplify this? I know that since z is a discrete random variable that changes some things. Thanks!