You forget the days count from your very FIRST visit to Peru. The time interval you are allowed to stay 183 days is counted from your first entry date ever to Peru. It is not per calender year. So while you may technically overstayed your visa, you may have not exhausted the days they are allowed to give you at the moment of your exit from the country. Just count it right.