How do you calculate the dividend discount model (DDM)?

What is the formula for valuing a stock based on expected future dividends?