Determine it Consider that ai,j is defined as:

{{  maxi<k≤n(ak,1+ak,j) ,i<n + max1≤k<j(ai,k+an,k) ,j>0 ,i≥j ai,j= 0 ,i=n 0 ,j=0 maxi≤k<j (ai,k + ak+1,j ) You are to calculate the value of a1,n on the basis of the values of n and an,1. Input , i < j The input consists of several test cases. Each Test case consists of two integers n (0 < n < 20) and an,1 (0 < an,1 < 500). Output For each test case your correct program should print the value of a1,n in a separate line. Sample Input 5 10 41 6 13 Sample Output 1140 42 3770