Monroe agreed to a three-year max contract with Bucks