/*poj.org pro 1003 hangover
author: bubble
date: 2013-7-15
*/
#include<stdio.h>
int main(){
double sum;
int n;
double len;
while(scanf("%lf",&sum)!=EOF&&sum!=0.00){
n=1;
len=0.00;
do{
len+=1.0/(n+1);
n++;
}while(len<sum);
printf("%d card(s)\n",n-1);
}
return 0;
}