A farmer had a successful year and harvested 5580 kg of potatoes. Unfortunately, 588 kg of these potatoes were of a low quality and couldn't be sold. How many kilograms of potatoes does the farmer have that are of good quality and can be sold?