#include "stdio.h" void main() { float d; int n=1; float sum = 0; scanf("%f",&d); while(sum<=d){ sum += 1.0/(n+1); n++; } printf("共走了%d步",n); }