Sex offender gets 3 years for living in prohibited area