import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String num = reader.readLine();
int b = Integer.parseInt(num);
sravnenie (b);
System.out.println(b);
}
public static int sravnenie (int a)
{
if (a>0)
{
return (a*2);
}
else if (a<0)
{
return (a+1);
}
else if (a==0)
{
return a;
}
return 0;
}
}
package com.javarush.task.task04.task0412;
/*
Положительное и отрицательное число
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String num = reader.readLine();
int b = Integer.parseInt(num);
sravnenie (b);
System.out.println(b);
}
public static int sravnenie (int a)
{
if (a>0)
{
return (a*2);
}
else if (a<0)
{
return (a-1);
}
else if (a==0)
{
return a;
}
return 0;
}
}