Mystery and Prime Editorial CDCS01

Problem link:
Contest

DIFFICULTY:
Cakewalk

PRE-REQUISITES:
None

PROBLEM:
A positive integer K will be given. Print the least significant bit (LSB) in the binary representation of X where X is Kth prime number.

EXPLANATION:
LSB shows whether the number is odd or even. All prime numbers are odd except first prime number, therefore answer for K=1 will be 0, otherwise 1.