using System;
public class Program
{
public static void Main()
int[] a = new int[]{4,0,1,-2,3};
int[] b = new int[a.Length];
for(int i=0; i<a.Length; i++)
b[i] = a[i];
if(i>0)
b[i]+=a[i-1];
}
if(i<a.Length-1)
b[i]+=a[i+1];
Console.WriteLine(b[i]);