Calculate
Stop on first duplicate location