#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int year;
	cin >> year;
	if (year % 400) cout << year;
 
	return 0;
}
				I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCB5ZWFyOwoJY2luID4+IHllYXI7CglpZiAoeWVhciAlIDQwMCkgY291dCA8PCB5ZWFyOwoJCglyZXR1cm4gMDsKfQ==