using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { ulong n = Convert.ToUInt64(Console.ReadLine()); //string[] m_temp = Console.ReadLine().Split(' '); //int[] m = Array.ConvertAll(m_temp,Int32.Parse); ulong s = 1; if(n > 2) s = F(n) / F(n - 2) / F(2) + 1; Console.WriteLine(s % (Math.Pow(10, 9) + 7)); } static ulong F(ulong num) { ulong b = 1; for(ulong i = 2; i < num + 1; i++) b*=i; return b; } }