#include <cstdio>
double ans[2005];
int main()
{
ans[0] = 0.0;
for (int i = 1; i < 2000; i ++) ans[i] = ans[i - 1] + (1.0 / (double)(i + 1));
double X;
while (scanf("%lf", &X) && X) for (int i = 0; i < 2000; i ++) if (ans[i] > X){printf("%d card(s)\n", i); break;}
}