using System;
public class Program
{
public static void Main()
bool found = false;
int result = 0;
for (int i = 1; i <= 1000; i++)
if (found) break;
for (int j = 1; j <= 1000; j++)
for (int k = 1; k <= 1000; k++)
if (i + j + k == 1000 && i * i + j * j == k * k)
found = true;
result = i * j * k;
}
Console.WriteLine(result);