Extract method for odd numbers

Signed-off-by: Igor Popov <igor.popov@napa.fi>