On a particular day, sweets were to be equally distributed among 495 students of a school. However, on that particular day 396 students from a nearby school also joined them. Hence each student present on that day got four sweets less. How many sweets were distributed?