A watering can contained 512 quarts water. After all the plants were watered, only 4 cups remained. How many cups of water were used to water the plants?