public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		StringBuilder out = new StringBuilder();
		for (int i = 1; i < dp.length; i++)
			dp[i] = (1.0 / (i + 1)) + dp[i - 1];
		while ((line = in.readLine()) != null && line.length() != 0) {
			double l = Double.parseDouble(line.trim());
			if (l == 0)
				break;
			out.append((lower_bound(l) + 1) + " card(s)\n");
		}
		System.out.print(out);
	}