if non - 8 is even or odd than add the next even .
if ( s . charAt ( index1 ) % 2 == 0 ) num = num * 10 + ( s . charAt ( index1 ) - '0' + 2 ) ; else num = num * 10 + ( s . charAt ( index1 ) - '0' + 1 ) ;