Search for index in sorted array

You are given a sorted array, from RAM[1000] to RAM[2000] (inclusive.) The number you are searching for is in RAM[0]. Write a program to add the index of that number to RAM[1].

Inputs

RAM[0] = 2403
RAM[1000] = 23
RAM[1001] = 25
...
RAM[1230] = 2297
RAM[1231] = 2403
...
RAM[2000] = 9020

Output

RAM[1] = 1231