Real Madrid agree €180 million deal