If you bought it from a dealer, and it is still in the warranty period, then take it back.
If bought privately, then either yourself or someone capable should perform a full brake flush, and see if that helps. You could even got a price for just a full fluid change from a main dealer.
Mike