using System;
using System.Numerics;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace Atcoder20200419
{
class ProgramA
{
static void Main(string args)
{
int k = int.Parse(Console.ReadLine());
//入力
string a = Console.ReadLine().Split(' ');
int s = int.Parse(a[0]);
int l = int.Parse(a[1]);
//sからlまで割ってみて割れるならOK
for(int i = s;i <= l;i++)
{
if (i % k == 0)
{
Console.WriteLine("OK");
return;
}
}
//ダメならNG
Console.WriteLine("NG");
}
}
class ProgramB
{
static void Main(string args)
{
//入力
long x = long.Parse(Console.ReadLine());
long yen = 100;
long count = 0;
//実際計算してみる(実際の計算結果がx円を超えたらおしまい)
while(x > yen)
{
yen = (long)(yen * 1.01);
count++;
}
//出力
Console.WriteLine(count);
}
}
class ProgramC
{
//決まっている条件はすべての関数内で作用するようにする
static int a = new int[50];
static int b = new int[50];
static int c = new int[50];
static int d = new int[50];
static List<int> ans = new List<int>();
static int n;
static int m;
static int q;
static int array = new int[10];//考えた配列
static void Main(string args)
{
//入力
string z = Console.ReadLine().Split(' ');
n = int.Parse(z[0]);
m = int.Parse(z[1]);
q = int.Parse(z[2]);
for (int i = 0; i < q; i++)
{
string y = Console.ReadLine().Split(' ');
a[i] = int.Parse(y[0]);
b[i] = int.Parse(y[1]);
c[i] = int.Parse(y[2]);
d[i] = int.Parse(y[3]);
}
//最初の文字と入れる場所の位置でDFS
dfs(1, 0);
//答え出力
Console.WriteLine(ans.Max());
}
/*深さ優先検索*/
static void dfs(int f,int j)
{
if (j == n)
{
int count = 0;
for (int i = 0; i < q; i++)
{
if (array[b[i] - 1] - array[a[i] - 1] == c[i])
count += d[i];
}
ans.Add(count);//数えたものを入れておく
}
else
{
for (int c = f; c <= m; c++)
{
array[j] = c;//追加する
dfs(c,j+ 1);//次の追加するところと始めるところを決める
}
}
}
}
class ProgramD
{
static void Main(string args)
{
//入力
string[] z = Console.ReadLine().Split(' ');
long a = long.Parse(z[0]);
long b = long.Parse(z[1]);
long n = long.Parse(z[2]);
//b-1かnが小さい方が答え
long temp = Math.Min(b - 1, n)/b;
Console.WriteLine(a * Math.Min(b - 1, n) / b - a * temp);
}
}
}