import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); int birthday = scan.nextInt(); int nowtime = 2017; System.out.println(nowtime - birthday); } }