// C# program to find smallest number
// evenly divisible by
// all numbers 1 to n
using System;
public class GFG{
static long gcd(long a, long b)
{
if(a%b != 0)
return gcd(b,a%b);
else
return b;
}
// Function returns the lcm of first n numbers
static long lcm(long n)
long ans = 1;
for (long i = 1; i <= n; i++)
ans = (ans * i)/(gcd(ans, i));
return ans;
// Driver program to test the above function
static public void Main (){
long n = 20;
Console.WriteLine(lcm(n));
//This code is contributed by akt_mit