#include int main() { int y,ny=2017; scanf("%d",&y); printf("%d\n",ny-y); return 0; }