Published 2021. 6. 6. 21:40
import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();

		//양수 -> 음수, 음수 -> 양수
        System.out.println(a * -1 );

    }
}
복사했습니다!