using system;
public class Test
{
static int getMoneySpent(int[] keyboards, int[] drives, int b) {
int indKeyboards=0,indDrives=0,start=0,HeighValues=0,store=-1;
for(int i = 0; i<keyboards.Length; i++)
{
for(int j = 0; j<drives.Length; j++)
{
HeighValues = keyboards[i] + drives[j];
if(HeighValues <= b && HeighValues > store) store = HeighValues;
}
}
return store;
}
public static void Main()
{
// your code goes here
}
}