This is the code, I'm not sure what's wrong:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));


            int a = Integer.parseInt(br.readLine());
            System.out.println(a<0 ? a+1 : a*a);