#include <iostream> using namespace std; int main(){ int time; cin >> time; cout << (time - 15 + 24)%24; return 0; }