#include<iostream>
using namespace std;

int main()
{
	double dNum;
	while(cin>>dNum&&dNum!=0.00)
	{
		int count=0;	//记录结果
		int n=2;
		while(dNum>=0)
		{
			dNum-=double(1.0)/n;
			count++;
			n++;
		}
		cout<<count<<" card(s)"<<endl;
	}
	return 0;
}