HangOver ACM problem!
C, 149 89

Well, this was a noobish shot at it, but probably a decent starting point:

#include &lt;cstdio&gt;
float i;
int o(float a,int n=2){return a&lt;0?n-2:o(a-1./n,n+1);}
main(){if (scanf("%f",&amp;i),i==0) return 0;printf("%d card(s)\n",o(i));main();}


It reported as 145 characters.



With a push in the right direction, I got the solution down to 122 by changing the function to a for loop.

#include &lt;cstdio&gt;
float i;
main(){
if (scanf("%f",&amp;i),i==0) return 0;
int n=2;for(;i&gt;0;)i-=1./n++;
printf("%d card(s)\n",n-2);
main();}




On a roll!

#include &lt;cstdio&gt;
main()
{
    float i,n=2;
    for(scanf("%f",&amp;i);i&gt;0;i-=1/n++);
    if (n-=2) printf("%.0f card(s)\n",n), main();
}


Scooted scanf, for loop division doesn't need 1. any more, adjusting n now done in conditional.



Switched over to C, got some good savings.  Down to 89 characters.

main(n)
{
    float i;
    for(scanf("%f",&amp;i);i&gt;0;i-=1./++n);
    if (--n) printf("%d card(s)\n",n), main(1);
}