using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _C__Prepisivaci
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());

            for (int i = 0; i < n; i++)
            {
                var s = Console.ReadLine();
            }

            Console.WriteLine(n * (n - 1)*(n - 2)*(n - 3) / 24);
        }
    }
}