In Indonesia, you can carry a maximum jail sentence of 32 months for masturbating. It is also illegal in Saudi Arabia where a teacher was given a three-year prison sentence for saying that masturbation is allowed.