#include<iostream>
using namespace std;
int main()
{
float num,sum,i;
while(cin>>num && num!=0.00)
{
i=2;
sum=0;
while(1)
{
sum+=1/i;
if(sum>=num)
{
cout<<i-1<<" card(s)"<<endl;
break;
}
i++;
}
}
return 0;
}