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