http://acm.hdu.edu.cn/showproblem.php?pid=1056
/*
2011-9-6
author:BearFly1990
*/
package acm.hdu.tests;
import java.io.BufferedInputStream;
import java.util.Scanner;
public class HDU_1056 {
public static void main(String[] args) {
Scanner in = new Scanner(new BufferedInputStream(System.in));
while(in.hasNext()){
Double length = in.nextDouble();
if(length.equals(new Double("0.00")))break;
Double sum = 0.0;
int counts = 1;
while (counts++ > 0){
sum+=(double)1/counts;
if(length<=sum){
System.out.printf("%d card(s)\n",counts-1);
break;
}
}
}
}
}