using System.Collections.Generic;
public static void Main()
int[] array = new int[]{3, 2, -2, 5, -3, 5,-5};
Dictionary<int, int> d = new Dictionary<int,int>();
foreach(int item in array)
if( d.ContainsKey( Math.Abs(item) ) )
if( Math.Abs(item) > result )
d.Add(Math.Abs(item),Math.Abs(item));
Console.WriteLine(result);