Maybe compute the bytes first, and then divide by 512?