#include <iostream>
using namespace std;
int main()
{
double c, cur;
int ans;
while(cin >> c)
{
if(c == 0.00)
break;
ans = 2;
cur = 0.00;
while(cur < c)
{
cur += 1.0 / ans++;
}
cout << ans - 2 << " card(s)" << endl;
}
return 0;
}