In railway lines where trains are running densely, a small increase in dwell time causes a delay and the delay tends to expand and propagate to many other trains. One method to avoid such delays is to increase buffer times between trains. The increase of buffer time, however, may cause an expansion of headway and we may have to decrease the frequency, which is never allowed in a congested railway line. In this paper, we propose a procedure to obtain a timetable in which enough buffer time exists without reducing the frequency of trains. Our key idea is to find a train performance curve that minimizes the departure-arrival interval of trains and make use of the generated time to increase the buffer times. In this process, we do not stick to the idea that travel times of trains have to be minimized. Following this procedure, we can increase the buffer times without reducing the frequency. We have applied our procedure to actual timetables and confirmed that our procedure works well.