Erdős–Gallai theorem