#include <iostream> using namespace std; int main(void) { int y; cin >> y; if (y >= 1000 && y <= 3000) { cout << y - 543 << endl; } return 0; }