#include<iostream> using namespace std; int main(){ int t,c; cin>>t; c=t/1800; if(c%2==0) cout<<c/2<<" 0 0"; else cout<<c/2<<" 30 0"; }