#include
using namespace std;
int main()
{
int i, j, k;
int n, count = 0;
cin >> n;
for(i = 1 ; i <= n*100; ++i)
for(j = 1; j <= n*50; ++j)
for(k = 1; k <= n*20; ++k)
if(i+2*j+5*k == n*100){
cout << i << " " << j << " " << k << endl;
count++;
}
cout << "\ntotoal:" << count << endl;
return 0;
}