Clustering Algorithm for Time Series with Similar Shapes