/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package isodd; import java.io.*; class Input { static InputStreamReader in; static BufferedReader reader; static { in = new InputStreamReader(System.in); reader = new BufferedReader(in); } static String readString() { String s = ""; try { s = reader.readLine(); } catch (IOException e) { System.out.println(e); System.exit(0); } return s; } static char readChar() { char ch = 'a'; try { String s = readString(); ch = s.charAt(0); } catch (Exception e) { System.out.println("输入的数据类型不对,程序将退出"); System.exit(0); } return ch; } static int readInt() { String s = readString(); int i = 0; try { i = Integer.parseInt(s); } catch (Exception e) { System.out.println("输入的数据类型不对,程序将退出"); System.exit(0); } return i; } static double readDouble() { String s = readString(); double d = 0.0; try { d = Double.parseDouble(s); } catch (Exception e) { System.out.println("输入的数据类型不对,程序将退出"); System.exit(0); } return d; } static float readFloat() { String s = readString(); float f = 0.0f; try { f = Float.parseFloat(s); } catch (Exception e) { System.out.println("输入的数据类型不对,程序将退出"); System.exit(0); } return f; } } public class Main { public static void main(String[] args) { int i=Input.readInt(); System.out.println(i % 2); } }