How to calculate stock price with dividend

How is stock price adjusted when dividends are distributed?