Vaccination in Sweden became enforced in 1880 , where parents were punished with fines or imprisonment for failing to immunize their child , and this helped bring the average number of smallpox deaths to just two deaths per year over the next two decades .