Jelly Shift

The square is stretched or flattened to pass through each bridge hole and reach the end point. How many levels can you pass?