Problem:
Score : 100 points

Problem Statement

Given is an integer x that is greater than or equal to 0, and less than or equal to 1.
Output 1 if x is equal to 0, or 0 if x is equal to 1.

Constraints

0 \leq x \leq 1

x is an integer

Input

Input is given from Standard Input in the following format:

x

Output

Print 1 if x is equal to 0, or 0 if x is equal to 1.

Sample Input 1

1

Sample Output 1

0

Sample Input 2

0

Sample Output 2

1

Solution in JavaScript (Node.js 12.16.1) (judge verdict: Wrong Answer)

function prod(input) {
	input = input.split(" ").map(Number);
	const arr1 = [input[0],input[1]]
    const arr2 = [input[2],input[3]];
  	let x = 0, y = 0;
  	let asc1 = arr1.sort((a,b) => a-b);
  	let dsc1 = arr1.sort((a,b) => b-a);
  	let asc2 = arr2.sort((a,b) => a-b);
  	let dsc2 = arr2.sort((a,b) => b-a);
	let mul1 = asc1[0] * asc2[0];
	let mul2 = asc1[0] * asc2[1];
  	let mul3 = asc1[1] * asc2[0];
  	let mul4 = asc1[1] * asc2[1];
	let res = [mul1,mul2,mul3,mul4].sort((a,b) => b - a);
	return res[0];
}
 
console.log(prod(require("fs").readFileSync("/dev/stdin", "utf8")));