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