#include <stdio.h>
void hangOver(float f)
{
int i=0;
float temp=0;
float sum=0;
for (i=2;sum<f;i++)
{
temp=(float)i;
sum+=1/temp;
}
printf("%d card(s)\n",(i-2));
}
int main()
{
float sum;
scanf("%f",&sum);
while (sum!=0)
{
if((sum>0.00)&&(sum<=5.20))
hangOver(sum);
scanf("%f",&sum);
}
return 0;
}