import std; void main() { int Y; readf("%d\n", Y); int res = 2017 - Y; res.writeln; }