Setting dim to be the total length of dst + 1