public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String xnumber = reader.readLine(); int number = Integer.parseInt(xnumber); System.out.println(hui(number)); } public static int hui(int a) { int b = a * 2; int c = a + 1; if (a < 0) return c; else { if (a > 0) return b; } } }