int n, nplus1; int x = 0X1; if( n % 2 == 0 ) nplus1 = n | x; else nplus1 = 2 * (int)ceil((double)n/2.0);