We consider an initial value problem for the Korteweg-de Vries (KdV) equation. The initial datum belongs to a class of (smooth) functions, which grow as $\sqrt[3]{-6x}$ as $x\to\pm\infty$. More precisely, the initial datum is a compactly supported perturbation of the exact solution $U(x,t)$ of the KdV equation, which simultaneously solves a Painleve-type equation, namely, the second member of the first Painleve hierarchy. We develop forward and inverse scattering problem for solving such an initial value problem. In order to achieve this, we show that the underlying Lax operator has spectrum, which is a one-folded real line. Furthermore, we define associated spectral functions $a(\lambda), b(\lambda),$ in terms of which we formulate an appropriate time-dependent Riemann-Hilbert problem. The solution of this Riemann-Hilbert problem then generates the solution to our initial value problem.  This is a joint work with B.Dubrovin, and the talk is based on arXiv:1901.07470."