fixed bug regarding input of an even number