Parity function

Returns the bitwise PARITY of an integer (1 if its binary representation contains odd number of ones and 0 otherwise).

function Parity (a : Int) : Int

Input

a
Int

Output

Int

Remarks

Examples

let a = 248;
let x = Parity(a); // x : Int = 1.