#B2019. Integer to Boolean Conversion
Integer to Boolean Conversion
Integer to Boolean Conversion
Given an integer variable, first assign its value to a boolean variable, then assign that boolean variable's value back to an integer variable. In many programming languages, converting an integer to a boolean follows the rule that 0 becomes false and any non-zero value becomes true. When a boolean is converted back to an integer, false becomes 0 and true becomes 1. Thus, the resulting value is \(0\) if the original integer is \(0\), otherwise it is \(1\).
inputFormat
The input consists of a single integer.
outputFormat
Output a single integer which is the result of converting the input integer to a boolean and then back to an integer. That is, output \(0\) if the input is \(0\) and \(1\) if the input is any non-zero integer.
sample
0
0