import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) val i = sc.nextInt println(2017 - i) }