Valeric and Valerko missed the last Euro football game, so they decided to watch the game's key moments on the Net. They want to start watching as soon as possible but the connection speed is too low. If they turn on the video right now, it will "hang up" as the size of data to watch per second will be more than the size of downloaded data per second.The guys want to watch the whole video without any pauses, so they have to wait some integer number of seconds for a part of the video to download. After this number of seconds passes, they can start watching. Waiting for the whole video to download isn't necessary as the video can download after the guys started to watch.Let's suppose that video's length is c seconds and Valeric and Valerko wait t seconds before the watching. Then for any moment of time t0, t ≤ t0 ≤ c + t, the following condition must fulfill: the size of data received in t0 seconds is not less than the size of data needed to watch t0 - t seconds of the video.Of course, the guys want to wait as little as possible, so your task is to find the minimum integer number of seconds to wait before turning the video on. The guys must watch the video without pauses.

The first line contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 1000, a > b). The first number (a) denotes the size of data needed to watch one second of the video. The second number (b) denotes the size of data Valeric and Valerko can download from the Net per second. The third number (c) denotes the video's length in seconds.

Print a single number — the minimum integer number of seconds that Valeric and Valerko must wait to watch football without pauses.

NoteIn the first sample video's length is 1 second and it is necessary 4 units of data for watching 1 second of video, so guys should download 4 · 1 = 4 units of data to watch the whole video. The most optimal way is to wait 3 seconds till 3 units of data will be downloaded and then start watching. While guys will be watching video 1 second, one unit of data will be downloaded and Valerik and Valerko will have 4 units of data by the end of watching. Also every moment till the end of video guys will have more data then necessary for watching.In the second sample guys need 2 · 10 = 20 units of data, so they have to wait 5 seconds and after that they will have 20 units before the second second ends. However, if guys wait 4 seconds, they will be able to watch first second of video without pauses, but they will download 18 units of data by the end of second second and it is less then necessary.

var a,b,c:integer;
begin
    readln(a,b,c);
    writeln(((a-b)*c+b-1)div b);
    readln;
end.

uses math;
const
        tfi     =       '';
        tfo     =       '';
        nmax    =       100;
var
        fi,fo:Text;
        n,m,a,b,c,res:longint;
procedure mo;
begin
        assign(fi,tfi);reset(fi);
        assign(fo,tfo);rewrite(fo);
end;
procedure dong;
begin
        close(fi);
        close(fo);
end;
procedure nhap;
var i,j:longint;
begin
        readln(fi,a,b,c);
end;
procedure khoitao;
var i,j,j1:longint;
begin
        for i:=1 to c do
          begin
            j1:=a*i;
            while( (i+res)*b < j1) do inc(res);
          end;
        writeln(fo,res);
end;
procedure xuly;
var i,j:longint;
begin
end;
procedure inkq;
var i,j:longint;
begin
end;
begin
        mo;
        nhap;
        khoitao;
        xuly;
        inkq;
        dong;
end.

var a,b,c,sum:longint;
begin
  readln(a,b,c);
  if a*c mod b=0
  then sum:=(a*c div b)-c
  else sum:=1+(a*c div b)-c;
  writeln(sum);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n, m, i, j, k, res, a, b, c : integer;
  s : string;

begin

  read(a, b, c);
  res := 0;
  while c * a - res * b > c * b do
    inc(res);

  writeln(res);

  readln;readln;
end.

program zA;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

const nmax=1000;
  mmax=1000;
  eps=1E-10;
  inf=maxint;

type point = record
  x,y: int64;
  end;

var
  n, m: integer;
  s: string;
  a,b,c: integer;

procedure wrtn(s: string);
begin
 write(s);
 Halt(0);
end;

begin
  {$IFNDEF ONLINE_JUDGE}
  reset(input, 'input.txt');
  rewrite(output, 'output.txt');
  {$ENDIF}

  read(a, b, c);

  write(trunc(a*c / b - c - 0.00001) + 1)

end.

var
  a, b, c, i, j, k: integer;
begin
  read(a, b, c);
  if (a*c-b*c) mod b = 0 then
    write((a*c-b*c) div b)
  else
    write((a*c-b*c) div b + 1)
end.

Uses SysUtils;
Var
   a,b,c:Integer;
Begin
   Read(a,b,c);
   If a*c mod b =0 Then Write(c*a div b-c)
                 Else Write(trunc(a*c/b-c)+1);
End.

var a,b,c,s,sek:longint;
begin
readln(a,b,c);
s:=a*c;
sek:=(s div b);
if s mod b<>0
then begin
     while s mod b <>0 do
     s:=s-1;
     c:=c-1;
     end;
writeln(sek-c);
end.

program projectA;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  aa,b,c,n,r : integer;
begin
Readln(aa,b,c);
n:=aa*c;
r:=n div b;
if n mod b >0 then r:=r+1;
r:=r-c;
Writeln(r);
end.

var a,b,c,i:longint;
Begin
        read(a,b,c);
        writeln(((a*c+b-1)div b)-c);
End.

program aaa;
Var a,b,c,i,al:longint;
begin
     readln(a,b,c);
     al:=(c*a+b-1) div b;
     for i:=1 to al do
     if al*b>=(al-i)*a
     then break;
     writeln(i);
end.

var a,b,r:longint;  begin readln(a,b,r);     writeln((a*r-1)div b+1-r); end.

program asdg;
var a,b,c,l,r,m,x0,ch:integer;
    dt:real;
begin
ch:=0;
read(a,b,c);
r:=a*c div b + 1;
l:=0;
while (r-l>1) or (ch=1) do
  begin
    m:=(r+l) div 2;
    x0:=m*b;
    dt:=(a*c-x0)/b;
    if dt<c then r:=m else l:=m;
    if r-l=1 then ch:=ch+1;
  end;
if dt=c then write(l) else write(l+1);
end.

program A_task;
var a,b,c:longint;
l1,l2,l3,res:longint;
begin
  Readln(a,b,c);
  l1:=b*c;
  l2:=a*c;
  l3:=l2-l1;
  res:=l3 div b;
  if (l3 mod b<>0) then inc(res);
  Writeln(res);
end.

program Atask;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var a,b,c : integer;
function ceil(x : real) : integer;
begin
    if x-trunc(x)<>0 then ceil:=trunc(x)+1 else ceil:=trunc(x);
end;
begin
    readln(a,b,c);
    writeln(ceil((a*c-b*c)/b));
    readln;
end.

var
 a,b,c:longint;
begin
 readln(a,b,c);
 if (a*c-b*c) mod b=0 then writeln((a*c-b*c) div b)
 else writeln(trunc((a*c-b*c)/b)+1);
end.

{$APPTYPE CONSOLE}

var a,b,c:integer;

begin
readln(a,b,c);
if c*(a-b) mod b =0  then
 writeln(c*(a-b) div b) else writeln(c*(a-b) div b +1);
 //readln;
end.

var a,b,c:word;
begin
  read(a,b,c);
  write((c*a-1)div b+1-c)
end.

var a,b,c:word;
    t:single;
begin
   read(a,b,c);
   t:=a*c/b-c;
   if t-int(t)=0 then writeln(trunc(t)) else writeln(trunc(t)+1)
end.

var a,b,c,s:longint;
begin
  readln(a,b,c);
  s:=(a*c-1) div b+1;
  writeln(s-c);
end.

uses math;
var a,b,c:integer;
    i,res,dau,cuoi,m,t:longint;
begin
    readln(a,b,c);
    dau:=1; cuoi:=(a*c) div b; res:=1000000000;
    while dau <= cuoi do
     begin
        m:=(dau+cuoi) div 2;
        t:=m*b;
        for i:=1 to c do
        t:=t + b - a;
        if t >= 0 then
         begin
                res:=min(res,m); cuoi:=m - 1;
         end
        else dau:=m + 1;
     end;
    writeln(res);
end.

var a,b,c,all,t0,t:longint;
begin
 readln(a,b,c);
 all:=trunc((c*a+b-1)/b);
 for t:=1 to all do
  begin
   t0:=all;
   if t0*b>=(t0-t)*a then begin writeln(t);break;end;
  end;
end.

var
      a, b, c : longint;
begin
      readln(a, b, c);
      if a - b <= 0 then
            writeln(0)
      else
            begin
            if c * a mod b = 0 then
                  writeln((c * a) div b - c)
            else
                  writeln((c * a) div b + 1 - c);
            end;
end.

program Project1;
{$APPTYPE CONSOLE}
uses
  SysUtils;
  var
  a,b,c : integer;
  res : real;

begin
  read (a,b,c);
  res := c*(a - b)/b;
  if trunc (res) = res then writeln (trunc(res)) else
  writeln (trunc(res) + 1);
  end.

program aa;
var
  a,b,c:longint;
begin
  read(a,b,c);
  a:=a*c;
  if trunc((a-(b*c))/b)<(a-(b*c))/b
    then
      write(trunc((a-(b*c))/b)+1)
    else
      write(trunc((a-(b*c))/b));
end.

var a,b,c,i,kq:integer; tneed,max:real;
begin
     read(a,b,c);
     for i:=1 to c do
     begin
          tneed:=(a-b)*i/b;
          if max<tneed then max:=tneed;
     end;
     if frac(max)<>0 then kq:=trunc(max)+1 else kq:=trunc(max);
     write(kq);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

var
  a, b, c, ans, i, j: integer;

begin
 { reset(input, 'input.txt');
  rewrite(output, 'output.txt'); }

  read(a, b, c);
  if (a*c - b*c) mod b = 0 then
    write((a*c - b*c) div b)
  else
    write((a*c - b*c) div b + 1)
end.

program Problem_A;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var a, b, c: Integer;

begin
  Readln(a, b, c);
  Writeln(((a - b)*c + b - 1)div b);
end.

var f1,f2:text;
a,b,c,s,i,j:longint;
rec,need:longint;
ok:boolean;
begin
        assign(f1,'');reset(f1);
        assign(f2,'');rewrite(f2);
        readln(f1,a,b,c);
        For i:=0 to 1000000 do
        begin
          rec:=b*i;
          need:=0;
          ok:=true;
          for j:=0 to c do
          begin
            if need>rec then begin ok:=false; break; end;
            rec:=rec+b;
            need:=need+a;
          end;
          if ok then
          begin
            writeln(f2,i);
            break;
          end;
        end;
        close(f1);
        close(f2);
end.

var
  a, b, c, t, t0, left, right: integer;

begin
  read(a, b, c);
  left := 0;
  right := (c*a+b-1) div b;
  t0:=right;
  while right - left > 1 do
  begin
    t := (right + left) div 2;
    if (t0* b) >=( (t0-t) * a) then right := t else
      left := t;
  end;
  write(right);
end.

Uses SysUtils;
Var
   a,b,c:Integer;
Begin
   Read(a,b,c);
   If a*c mod b =0 Then Write(c*a div b-c)
                 Else Write(trunc(a*c/b-c)+1);
End.

Var a,b,c,dan,pov:longint;
begin
readln(a,b,c);
pov:=((c*a-1) div b+1 -c);
writeln(pov);
end.

var
    t, t0, a, b, c: integer;
begin
    readln(a, b, c);
    t0 := (c * a + b - 1) div b;
    for t := 1 to t0 do
        if(t0 * b >= (t0 - t) * a) then  break;
    writeln(t);
end.

var
a,b,c,i:longint;
d:boolean;

procedure readdata;
begin
read(a,b,c);
i:=1;
d:=false;
end;

begin
  readdata;
  while d=false do
  begin
  if (b-a)*c+i*b>=0 then d:=true;
  inc(i);
  end;
  writeln(i-1);
end.

var
a,b,c,i,j,f:longint;
begin
read(a,b,c);
f:=a*c;
j:= f div b;
if(f mod b > 0) then j:=j+1;
i:=j-c;
write(i);
end.

const fi = '';
      fo = '';
var a,b,c:integer;
procedure nhap;
var f:text;
begin
    assign(f,fi);
    reset(f);
    readln(f,a,b,c);
    close(f);
end;
procedure xuat;
var f:text;
    d,s:longint;
begin
    assign(f,fo);
    rewrite(f);
    s:=b; d:=1;
    while s<a*c do
    begin
        inc(d);
        s:=s+b;
    end;
    writeln(f,d-c);
    close(f);
end;
begin
    nhap;
    xuat;
end.

program temm_answer;
var
    a,b,c,an:longint;
begin
    readln(a,b,c);
    an:=((a-b)*c) div b;
    if (((a-b)*c) mod b)>0 then inc(an);
    write(an);
end.

var
a,b,c:integer;
begin
reset (input);
rewrite (output);
readln (a,b,c);
if (a*c-b*c) mod b=0 then
    writeln ((a*c-b*c) div b)
else
    writeln ((a*c-b*c) div b+1);
close (input);
close (output);
end.

program pr1;

{$APPTYPE CONSOLE}
type int64=longint;
const nnn=1000001; besk=2000000000;
 eps=0.00000000001;
 label 1,2,3,4;
var kk,ni,nj,nk,step,d,pp,jj,kolmash,kolper,k,i,j,ii,start,finish,per:longint;
zad,a,b,c,t1,t2,t,p,nn,modul,r,ot,dx1,dy1,t1old,t2old,f,n,mmin,imin,p1,p2,s,l,m,k1,k2,a2:int64;
koef:int64;  ch,ch1,ch2:char;
cc,g,al,ttt,tt,v,xx,yy,aa,bb:double;
skach,smotr,dist:array[0..10000] of int64;
flag2,flag1,flag:boolean;
x,y,deg :array[0..30000] of int64;
mask:array[0..20000000] of longint;
c2:char;
dd :double;
ss1,ss2,ss,namemin:string;
sss:array[0..500000] of string;
name:array[0..2000] of string;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:int64):int64; var p,t:int64;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

 function luck(a:longint):boolean;
 var i,j,k:longint;flag:boolean;
 c: array[0..10] of longint;
begin
  flag:=true;  j:=0;
  k:=a;
  while k>0 do begin inc(j); c[j]:=k mod 10; k:= k div 10; {writeln(j,' uu ',k); }  end;
 for i:=1 to j do if (c[i]<>4)and(c[i]<>7) then flag:=false;
 luck:=flag;
end;

{ function deg(a,b,modd:int64):int64; var i,j,t:int64; flag:boolean;
begin
    if b=0 then deg:=1 else
  begin
    if odd(b) then deg:=a*deg(a,b-1,modd) mod modd else
    begin t:=deg(a,b div 2,modd); deg:=t*t mod modd;      end;
  end;

end;
 }

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}     read(a,b,c);
     for zad:=0 to 1000000 do
  begin
     flag:=true;
     for i:=0 to c do
     begin skach[i]:=b*(i+zad); smotr[i]:=a*i;    end;
     for i:=c to c do if (skach[i]<smotr[i]) then flag:=false;
    {for i:=0 to c do write()
    } if flag then goto 2;
   end;
2: writeln(zad);
   1:          close(output);
end.

var a,b,c,sum:longint;
begin
  readln(a,b,c);
  if a*c mod b=0
  then sum:=(a*c div b)-c
  else sum:=1+(a*c div b)-c;
  writeln(sum);
end.

var a,b,c:integer;
begin
readln(a,b,c);
if ((a-b)*c/b)>trunc((a-b)*c/b) then writeln(trunc((a-b)*c/b)+1)
else writeln(trunc((a-b)*c/b));
end.

var a,b,c,t,i:longint;
begin
  //assign(input,'input.txt');
  //reset(input);
  //assign(output,'output.txt');
  //rewrite(output);
  read(a,b,c);
  for t:=0 to 1000000 do
    if (b*(c+t)>=a*c) then begin
      writeln(t);
      halt;
    end;
end.

var
  a,b,c:longint;
begin
  readln(a,b,c);
  a:=a*c;
  if a mod b<>0 then
    a:=a div b+1-c
  else
    a:=a div b-c;
  writeln(a);
end.

var
 a,b,c,k1:longint;
 k:extended;
begin
{ assign(input,'a.in');
 reset(input);
 assign(output,'a.out');
 rewrite(output);}
 readln(a,b,c);
 k:=(c*a-c*b)/b;
 k1:=trunc(k);
 if k>k1 then writeln(k1+1)else writeln(k1)
end.

var a,b,c:longint;
begin
    readln(a,b,c);
    a:=a*c;
    writeln(((a-1)div b)+1-c);
end.

var a,b,c,t:real;
begin
readln(a,b,c);
t:=(a*c)/b-c;
if frac(t)=0 then writeln(trunc(t)) else writeln(trunc(t)+1);
readln;
end.

const fin='';
     fout='';
var f,g:text;
     a,b,c,t:longint;
begin
     assign(f,fin); reset(f);
     assign(g,fout); rewrite(g);
     read(f,a,b,c);
     t:=c*(a-b);
     if t mod b<>0 then t:=t+b;
     write(g,t div b);
     close(g);
end.

{$APPTYPE CONSOLE}

uses
  SysUtils;
var a,b,c:integer;
d:real;
begin
  readln(a,b,c);
  d:=c*(a-b)/b;
  if (trunc(d)=d) then writeln(d:0:0)
  else writeln(trunc(d+1));
end.

program Project1;
{$APPTYPE CONSOLE}
uses
  SysUtils;
  var
  a,b,c : integer;
  res : real;

begin
  read (a,b,c);
  res := c*(a - b)/b;
  if trunc (res) = res then writeln (trunc(res)) else
  writeln (trunc(res) + 1);
  end.

var a,b,c,time:longint;

function check(time:longint):boolean;
var i,t:longint;
begin
 for t:= time to time+c do
  if t*b<(t-time)*a then
   begin
    check:=false;
    exit;
   end;
  check:=true;
end;

begin
 readln(a,b,c);
 for time:= 0 to 1000000 do
  if check(time) then
   begin
    writeln(time);
    halt;
   end;
end.

Program abc;
Var right,left,a,b,c,sred,vsego,z:longint;
Begin
read(a,b,c);
Left:=0; Right:=(c+1)*1000; vsego:=a*c;
While right-left>1 do
 begin z:=0;
 sred:=(right+left)div 2;
 for var x:=1 to C do
   begin If (sred*b+b*x>=vsego) then begin right:=sred; z:=1; break; end; end;
 If z=0 then left:=sred;
 end;
Writeln(left+1);
end.

var a,b,c,i:longint;
    t:extended;
 begin
  read(a,b,c);
  for i:=1 to 10000000 do
   begin
    t:=i*a/(a-b);
    if t>=i+c then begin
                    writeln(i);
                    halt;
                   end;
   end;
 end.

program tr1_l;
var a,b,c,i,n:longint;
begin
readln (a,b,c);
n:=a*c;
for i:=1 to 1000000 do
 begin
   if b*i+c*b>=n then begin writeln (i); break; end;
 end;
end.

program PA;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
a,b,c: word;
t: LongWord;
begin
  read(a); read(b); read(c);
  if a>b then
  begin
    if (c*(a-b)/b)>trunc(c*(a-b)/b) then
      t:=trunc(c*(a-b)/b)+1
    else
      t:=trunc(c*(a-b)/b);
  end
  else
    t:=0;
  writeln(t);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils,math;
   var a,b,c,t0,t,n:integer; bo:boolean;
begin
  readln(a,b,c);
  for t:=1 to a*c do
  begin
    bo:=true;
    n:=c+t;
    for t0:=t to n do
    if t0*b<(t0-t)*a then begin bo:=false; break; end;
    if bo=true then begin writeln(t); exit; end;
  end;
end.

program projectA;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  aa,b,c,n,r : integer;
begin
Readln(aa,b,c);
n:=aa*c;
r:=n div b;
if n mod b >0 then r:=r+1;
r:=r-c;
Writeln(r);
end.

{$R+ Q+ I+}
{$APPTYPE CONSOLE}
uses
  SysUtils;
var
    a,b,c,ans : integer;
begin
     read(a,b,c);
     ans := 0;
     if a*c mod b = 0 then ans := a*c div b
     else ans := a*c div b + 1;
     write(ans - c);
end.

var a,b,c, s, k: LongInt;
begin
  Readln(a,b,c);

  if b>=a then
  begin
    Writeln(0);
    halt(0);
  end;

  s:=a*c;

  if ((s mod b)=0) then k:=s div b - c else k:=s div b - c + 1;

  Writeln(k);
end.

var a,b,c:integer;
begin
readln(a,b,c);
if ((a-b)*c/b)>trunc((a-b)*c/b) then writeln(trunc((a-b)*c/b)+1)
else writeln(trunc((a-b)*c/b));
end.

var a, b, c : longint;
    l, h, m : longint;
    f, x, i : longint;
    ans     : longint;
begin
  read(a, b, c);
  l := 0;
  h := 1000000;
  ans := -1;
  while l <= h do
  begin
    m := (l + h) div 2;
    f := 1;
    x := m * b;
    for i := 1 to c do
    begin
      x := x + b;
      if i > x div a then
      begin
        f := 0;
        break;
      end;
    end;
    if f = 1 then
    begin
      h := m - 1;
      ans := m;
    end
    else
      l := m + 1;
  end;
  write(ans);
end.

Var i,a,b,c,t,j:longint;
    ok:boolean;
 begin
  read(a,b,c);
  i:=1;
  while true do
   begin
    t:=b*i;
    ok:=true;
    for j:=1 to c do
     begin
      t:=t+b;
      if t<a*j then begin
                     ok:=false;
                     break;
                    end;
     end;
    if ok then begin writeln(i); halt(0); end;
    inc(i);
   end;
 end.

var
  a,b,c:integer;
  x:extended;
begin
  readln(a,b,c);
  x:=((a-b)*c)/b;
  if((a-b)*c) mod b>0 then x:=x+1;
  if x<=0 then x:=x+1;
  writeln(trunc(x));
end.

var a,b,c,s,t,i: integer;
  begin
      readln (a,b,c);
      s:=(c*a+b-1) div b;
      t:=s+1;
      for i:=1 to s do
        begin
          if s*b>=(s-i)*a then if i<t then t:=i;
        end;
      writeln (t);
  end.

var
a,b,c,i:longint;
d:boolean;

procedure readdata;
begin
read(a,b,c);
i:=1;
d:=false;
end;

begin
  readdata;
  while d=false do
  begin
  if (b-a)*c+i*b>=0 then d:=true;
  inc(i);
  end;
  writeln(i-1);
end.

const fin='';
     fout='';
var f,g:text;
     t,a,b,c:longint;
begin
     assign(f,fin); reset(f);
     assign(g,fout); rewrite(g);
     read(f,a,b,c);
     t:=c*(a-b);
     if t mod b<>0 then t:=t+b;
     write(g,t div b);
     close(g);
end.

var
 n,k,l,i,j,r,o,p,m,c,a,b:longint;
 s:int64;
begin
 readln(a,b,c);
 a:=a*c;
 s:=a div b;
 if a mod b<>0 then inc(s);
 dec(s,c);
 if s<=0 then writeln(0) else writeln(s);
end.

program Project4;
{$APPTYPE CONSOLE}

uses sysutils,math;

var n,m,k,r,l,a,b,c: int64;
    i,j: longint;

begin
  read(a,b,c);
  l := 0;
  r := trunc((a*c) / b);
  while r-l > 1 do
    begin
      m := (l + r) DIV 2;
      n := a*c - m * b - c * b;
      if n > 0 then l := m else if n < 0 then r := m else begin write(m); exit end
    end;
    write(r);
end.

var a,b,c,d:longint;
begin
   readln(a,b,c);
   for d:=1 to 1000000 do
      if (c+d)*b>=c*a
      then begin
              writeln(d);
              exit
           end;
end.

var a,b,c:integer;
begin
    readln(a,b,c);
    writeln((a*c-1)div b+1-c);
end.

const   fi      =       '';
        fo      =       '';
type    int     =       longint;
var     a,b,c   :       int;
        Res     :       int;
{}
procedure xl;
var l,r,m : int;
begin
        l := 1; r := a*(c+1) div b;
        while l+1<r do
           begin
                  m := (l+r) div 2;
                  if (m+C)*b<(a*c) then l := m+1
                    else r := m;
           end;
        if (l+c)*b>=(a*c) then res := l else res :=r;
end;
{}
procedure docdl;
begin
        assign(input,fi);       reset(input);
        readln(a,b,c);
        close(input);
end;
{}
procedure ghikq;
begin
        assign(output,fo);      rewrite(output);
        writeln(Res);
        close(output);
end;
{}
begin
        docdl;
        xl;
        ghikq;
end.

program square;
var a,b,c: integer;
begin
read(a,b,c);
if ((a*c) mod b=0) then write(((a*c) div b)-c)
else write(((a*c) div b)+1-c);
end.

var
   a,b,c,x:longint;
begin
   read(a,b,c);
   if a*c mod b = 0 then x:=a*c div b
      else x:=a*c div b + 1;
   x:=x-c;
   write(x);
end.

program Projecta;

{$APPTYPE CONSOLE}

var
  i, a, b, c, l, r, m, count : integer;
  good : boolean;

begin
 { reset(input, 'input.txt');
  rewrite(output, 'output.txt');}
  readln(a, b, c);
  l := 0;
  r := 1000001;
  while (r - l > 1) do begin
    m := (l + r) div 2;
    good := true;
    for i := m to m + c do
      if (i * b < (i - m) * a) then
        good := false;
    if (not good) then
      l := m
    else
      r := m;
  end;
  writeln(r);

end.

var a,b,c,k,t,p:longint;
   ok:boolean;
   i:longint;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=0 to 1000000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) do
         begin
           inc(p,a);
           inc(t,b);
           if (p=k) and (p<=t) then break;
           if (p>t) then begin ok:=false; break; end;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

const
    finp='';
    fout='';
var a,b,c,dem:longint;
procedure nhap;
var f:text;
begin
    assign(f,finp);
    reset(f);
    readln(f,a,b,c);
    close(f);
end;
{-----------------------}
procedure xuli;
var t,s:longint;
begin
    t:=a*c;
    s:=b*c;
    while s<t do
        begin
            inc(dem);
            inc(s,b);
        end;
end;
{-----------------------}
procedure xuat;
var g:text;
begin
    assign(g,fout);
    rewrite(g);
    write(g,dem);
    close(g);
end;
{-----------------------}
begin
    nhap;
    xuli;
    xuat;
end.

{$MODE OBJFPC}
var
  i,j,a,b,c,dl,tg,k,h,tt,l,mid:integer;
  kt:boolean;

begin
  readln(a,b,c);
  tg:=a*c div b+1;
  for i:=0 to tg do
    begin
      kt:=true;
      k:=i*b;
      j:=1;
      tt:=0;
      l:=1;h:=c;
      while (h>l) do
        begin
          mid:=(l+h) div 2;
          if (tt+mid*a>k+mid*b) then
             begin
               kt:=false;
               break;
             end;
          l:=mid+1;
        end;
      if (tt+l*a>k+l*b) then
        continue;
      if kt then
        begin
          writeln(i);
          halt;
        end;
    end;
end.

var
        a,b,c,first,last,mid,dl : int64;
begin
        readln(a,b,c);
        dl := c*a;
        first := 0;
        last := 1000000000;
        repeat
                mid := (first + last) >> 1;
                if (dl - mid*b) < 0 then last := mid
                else if (dl - mid*b >= 0) and ((dl - mid*b)/c <= b) then last := mid
                else first := mid;
        until first+1 = last;
        writeln(last);
end.

program Project1;
{$APPTYPE CONSOLE}
uses
  SysUtils;
  var
  a,b,c : integer;
  res : real;

begin
  read (a,b,c);
  res := c*(a - b)/b;
  if trunc (res) = res then writeln (trunc(res)) else
  writeln (trunc(res) + 1);
  end.

var
  a, b, c,left, right,sr,dt: int64;

begin
  read(a, b, c);
  left := 0;
  right := (c*a+b-1) div b;
  dt:=right;
  while right - left > 1 do
  begin
    sr := (right + left) div 2;
    if (dt* b) >=( (dt-sr) * a) then right := sr else
      left := sr;
  end;
  write(right);
end.

var a,b,c:word;
begin
  read(a,b,c);
  write((c*a-1)div b+1-c)
end.

var a,b,c,all,t0,t:longint;
begin
 readln(a,b,c);
 all:=trunc((c*a+b-1)/b);
 for t:=1 to all do
  begin
   t0:=all;
   if t0*b>=(t0-t)*a then begin writeln(t);break;end;
  end;
end.

var a,b,c:word;
    t:single;
begin
   read(a,b,c);
   t:=a*c/b-c;
   if t-int(t)=0 then writeln(trunc(t)) else writeln(trunc(t)+1)
end.

var
  a,b,c,x,y:longint;
begin
  readln(a,b,c);
  x:=(a-b)*c;
  y:=x div b;
  if x mod b>0 then inc(y);
  writeln(y);
end.

Program watch_football;
Var a,b,c: Integer;
    res: LongInt;
Begin
  Readln(a,b,c);
  res:=a*c;
  If (res mod b)<>0 Then res:=(res div b)+1
                    Else res:=res div b;
  res:=res-c;
  Writeln(res);
End.

Var a,b,c,t,t1,j,i:LongInt;
    y:Boolean;
  begin
    ReadLn(a,b,c);
    if b*c>=a*c then begin WriteLn(0); exit; end;
    t:=a*c;
    While true do
      begin
        Inc(I);
        y:=true;
        For j:=i to c+i do
         if j*b<(j-i)*a then begin y:=false; break; end;
        if y then begin WriteLn(i); exit; end;
      end;
  end.

var
a,b,k,c,d,e,s: integer;
begin
readln(a,b,c);
s:=a*c;
e:=b*c;
k:=((s-e) div b);
if (k*b)+(c*b)>=s then writeln(k) else writeln(k+1);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
 a,b,c,res:int64;
 r:extended;
begin

  readln(a,b,c);

  if (b>=a)then writeln('0') else begin
       r:=c*(a-b)/b;
       res:=trunc(c*(a-b)/b) ;
       if (r>res) then writeln(res+1) else writeln(res);
  end;
end.

var
a,b,c,d,data,sec: longint;

begin
        readln(a,b,c);

        data:= a*c;
        d:= b*c;

        sec:= data-d;

        if (sec mod b =0) then writeln(sec div b)
        else writeln((sec div b)+1);

end.

program Project2;

{$APPTYPE CONSOLE}

var n,i,j,k,l,m:integer;
    a,b,c:integer;
begin
read(a,b,c);
a:=a-b;
a:=a*c;
k:= a div b;
if a mod b<>0 then k:=k+1;
write(k);
read(i);
end.

Program abc;
Var right,left,a,b,c,sred,vsego,z:integer;
Begin
read(a,b,c);
Left:=0; Right:=1001; vsego:=a*c;
While right-left>1 do
 begin z:=0;
 sred:=(right+left)div 2;
 for var x:=1 to C do
   begin If (sred*b+b*x>=vsego) then begin right:=sred; z:=1; break; end; end;
 If z=0 then left:=sred;
 end;
Writeln(left+1);
end.

Program abc;
Var right,left,a,b,c,sred,vsego,z:longint;
Begin
read(a,b,c);
Left:=0; Right:=100000000000; vsego:=a*c;
While right-left>1 do
 begin z:=0;
 sred:=(right+left)div 2;
 for var x:=1 to C do
   begin If (sred*b+b*x>=vsego) then begin right:=sred; z:=1; break; end; end;
 If z=0 then left:=sred;
 end;
Writeln(left+1);
end.

Program abc;
Var right,left,a,b,c,sred,vsego,z:longint;
Begin
read(a,b,c);
Left:=0; Right:=100000001; vsego:=a*c;
While right-left>1 do
 begin z:=0;
 sred:=(right+left)div 2;
 for var x:=1 to C do
   begin If (sred*b+b*x>=vsego) then begin right:=sred; z:=1; break; end; end;
 If z=0 then left:=sred;
 end;
Writeln(left+1);
end.

var n,m,d,kd,otv:integer;
begin
readln(n,m,d);
kd:=(n-m)*d;
otv:=kd div m;
if kd mod m<>0 then otv:=otv+1;
end.

var a,b,c,left,right,sred,obkol,kol,i:integer;
begin
readln(a,b,c);
left:=0;
right:=1000;
sred:=(left+right) div 2;
obkol:=a*c;
kol:=sred*b+c*b;
while (right-left)>1 do begin
  if kol>=obkol then right:=sred
  else left:=sred;
  sred:=(left+right) div 2;
  kol:=sred*b+c*b;
  end;
writeln(right);
end.

program Project4;
{$APPTYPE CONSOLE}

uses sysutils,math;

var n,m,k,r,l,a,b,c: int64;
    i,j: longint;

begin
  read(a,b,c);
  l := 1;
  r := trunc((a*c) / b);
  while r-l > 1 do
    begin
      m := (l + r) DIV 2;
      n := a*c - m * b - c * b;
      if n > 0 then l := m else if n < 0 then r := m else begin write(m); exit end
    end;
    write(r);
end.

var a,b,c, s, k: LongInt;
begin
  Readln(a,b,c);

  if b>=a then
  begin
    Writeln(0);
    halt(0);
  end;

  s:=a*c;

 if (s-b)<b then k:=1 else k:=(s-b) div b;

Writeln(k);
end.

program pr1;

{$APPTYPE CONSOLE}
type int64=longint;
const nnn=1000001; besk=2000000000;
 eps=0.00000000001;
 label 1,2,3,4;
var kk,ni,nj,nk,step,d,pp,jj,kolmash,kolper,k,i,j,ii,start,finish,per:longint;
zad,a,b,c,t1,t2,t,p,nn,modul,r,ot,dx1,dy1,t1old,t2old,f,n,mmin,imin,p1,p2,s,l,m,k1,k2,a2:int64;
koef:int64;  ch,ch1,ch2:char;
cc,g,al,ttt,tt,v,xx,yy,aa,bb:double;
skach,smotr,dist:array[0..10000] of int64;
flag2,flag1,flag:boolean;
x,y,deg :array[0..30000] of int64;
mask:array[0..20000000] of longint;
c2:char;
dd :double;
ss1,ss2,ss,namemin:string;
sss:array[0..500000] of string;
name:array[0..2000] of string;
function min (a,b:longint):longint;begin min:=b;if a<b then min:=a;  end;
function max (a,b:longint):longint;begin max:=b;if a>b then max:=a;  end;

function nod(a,b:int64):int64; var p,t:int64;
begin if (a>0)and(b>0) then
   begin while (b>0) do begin t:=a mod b;a:=b;b:=t;    end;
    p:=a;
   end else if a=0 then p:=b else p:=a;
nod:=p;
end;

 function luck(a:longint):boolean;
 var i,j,k:longint;flag:boolean;
 c: array[0..10] of longint;
begin
  flag:=true;  j:=0;
  k:=a;
  while k>0 do begin inc(j); c[j]:=k mod 10; k:= k div 10; {writeln(j,' uu ',k); }  end;
 for i:=1 to j do if (c[i]<>4)and(c[i]<>7) then flag:=false;
 luck:=flag;
end;

{ function deg(a,b,modd:int64):int64; var i,j,t:int64; flag:boolean;
begin
    if b=0 then deg:=1 else
  begin
    if odd(b) then deg:=a*deg(a,b-1,modd) mod modd else
    begin t:=deg(a,b div 2,modd); deg:=t*t mod modd;      end;
  end;

end;
 }

begin
{assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
}     read(a,b,c);
     for zad:=0 to 10000 do
  begin
     flag:=true;
     for i:=0 to c do
     begin skach[i]:=b*(i+zad); smotr[i]:=a*i;    end;
     for i:=0 to c do if (skach[i]<smotr[i]) then flag:=false;
    {for i:=0 to c do write()
    } if flag then goto 2;
   end;
2: writeln(zad);
   1:          close(output);
end.

{$R+}
var a,b,c,l,r,m:longint;

function check(v:longint):boolean;
begin
 if (a*c-b*v) div c<=b then check:=true
                       else check:=false;
end;

begin
 readln(a,b,c);
 l:=1;
 r:=a*c div b+1;
 while r-l>1 do
 begin
  m:=(L+r) div 2;
  if check(m) then r:=m
              else l:=m;
 end;
 if check(l) then writeln(l)
             else writeln(r);
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
 var
   i,j,k,x,y,z:Int64;
begin
 Readln (i,j,k);
 y:=i*k;
 x:=y div j;
// if i mod j >0 then inc (x);
 z:=x-k;
  Writeln (z);
 Readln
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
 var
   i,j,k,x,y,z:Int64;
begin
 Readln (i,j,k);
 y:=i*k;
 x:=y div j;
 if y mod j >(j-(j div 2)) then inc (x);
 z:=x-k;
  Writeln (z);
 Readln
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
 var
   i,j,k,x,y,z:Int64;
begin
 Readln (i,j,k);
 y:=i*k;
 x:=y div j;
 if i mod j >0 then inc (x);
 z:=x-k;
  Writeln (z);
 Readln
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
 var
   i,j,k,x,y,z:Int64;
begin
 Readln (i,j,k);
 y:=i*k;
 x:=y div j;
 if i mod j >(j+1 div 2) then inc (x);
 z:=x-k;
  Writeln (z);
 Readln
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;
 var
   i,j,k,x,y,z:Integer;
begin
 Readln (i,j,k);
 y:=i*k;
 x:=y div j;
 if i mod j >0 then inc (x);
 z:=x-k;
  Writeln (z);
 Readln
end.

{$R+,Q+,I+}
{$apptype console}
Uses SysUtils;
Var
   a,b,c,t,f,s1,s2,i:Integer;
Begin
   Read(a,b,c);
   For t:=1 To 2000 Do Begin
      f:=1;
      For i:=t To c+t Do Begin
         s1:=i*b;
         s2:=a*(i-t);
         If s1<s2 Then Begin
            f:=0;
            Break;
         End;
      End;
      If f=1 Then Break;
   End;
   Write(t);
End.

Var
   a,b,c:Integer;
Begin
   Read(a,b,c);
   If c mod b =0 Then Write(c*a div b-c)
                 Else Write(trunc(a*c/b-c));
End.

var
 a,b,c,k:longint;
begin
{ assign(input,'a.in');
 reset(input);
 assign(output,'a.out');
 rewrite(output);}
 readln(a,b,c);
 if c>1 then
 begin
  k:=(a*c)div b;
  if (k-b<=b)and(k-b>=1) then  writeln(k-1)else writeln(k);
 end
 else writeln(a*b-c)
end.

var
 a,b,c,k,k1:longint;
begin
{ assign(input,'a.in');
 reset(input);
 assign(output,'a.out');
 rewrite(output);}
 readln(a,b,c);
 if c>1 then
 begin
  k:=(a*c)div b;
  k1:=(a*c)-b;
  if (k*b-k1<b)and(k>=1) then  writeln(k-1)else writeln(k);
 end
 else writeln(a*c-b)
end.

var
 a,b,c,k:longint;
begin
{ assign(input,'a.in');
 reset(input);
 assign(output,'a.out');
 rewrite(output);}
 readln(a,b,c);
 k:=(a*c)div(b*c)*c;
 if k>1 then writeln(k-1)else writeln(k);
end.

var
 a,b,c,k,k1:longint;
begin
{ assign(input,'a.in');
 reset(input);
 assign(output,'a.out');
 rewrite(output);}
 readln(a,b,c);
 if c>1 then
 begin
  k:=(a*c)div b;
  k1:=(a*c)-b;
  if (k*b-k1<b)and(k>=1) then  writeln(k-1)else writeln(k);
 end
 else writeln(1)
end.

uses math;
var a,b,c:integer;
    i,res,dau,cuoi,m,t:longint;
begin
    readln(a,b,c);
    dau:=1; cuoi:=(a*c) div b; res:=1000;
    while dau <= cuoi do
     begin
        m:=(dau+cuoi) div 2;
        t:=m*b;
        for i:=1 to c do
        t:=t + b - a;
        if t >= 0 then
         begin
                res:=min(res,m); cuoi:=m - 1;
         end
        else dau:=m + 1;
     end;
    writeln(res);
end.

uses math;
var a,b,c:integer;
    i,res,dau,cuoi,m,t:integer;
begin
    readln(a,b,c);
    dau:=1; cuoi:=(a*c) div b; res:=1000;
    while dau <= cuoi do
     begin
        m:=(dau+cuoi) div 2;
        t:=m*b;
        for i:=1 to c do t:=t + b - a;
        if t >= 0 then
         begin
                res:=min(res,m); cuoi:=m - 1;
         end
        else dau:=m + 1;
     end;
    writeln(res);
end.

var
 i,j,n,m,k,a,b,c:longint;
begin
 readln(a,b,c);
 if a*c mod b=0 then writeln((a*c) div b+1)
  else writeln((a*c) div b);
end.

var
 i,j,n,m,k,a,b,c:longint;
begin
 readln(a,b,c);
 k:=(a*c) div b;
 if (a*c mod b=0)and(a*c mod 2=0) then writeln(k div 2+1)
  else writeln(k div 2);
end.

var
 i,j,n,m,k,a,b,c:longint;
begin
 readln(a,b,c);
 k:=(a*c) div b;
 if k=1 then writeln(k)
 else writeln(k-1);
end.

var a,b,c,i,k,t,p:longint;
   ok:boolean;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=0 to 10000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) and (p<=t) do
         begin
           inc(p,a);
           inc(t,b);
           if p>t then begin ok:=false; break; end;
           if p=k then break;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

var a,b,c,k,t,p:int64;
   ok:boolean;
   i:longint;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=1 to 10000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) do
         begin
           inc(p,a);
           inc(t,b);
           if p=k then break;
           if (p>t) then begin ok:=false; break; end;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

var a,b,c,k,t,p:int64;
   ok:boolean;
   i:longint;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=1 to 10000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) do
         begin
           inc(p,a);
           inc(t,b);
           if (p=k) and (p<=t) then break;
           if (p>t) then begin ok:=false; break; end;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

var a,b,c,i,k,t,p:longint;
   ok:boolean;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=0 to 10000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) and (p<=t) do
         begin
           inc(p,a);
           inc(t,b);
           if p>t then begin ok:=false; break; end;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

var a,b,c,k,t,p:int64;
   ok:boolean;
   i:longint;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=1 to 10000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) do
         begin
           inc(p,a);
           inc(t,b);
           if p=t then break;
           if (p>t) then begin ok:=false; break; end;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

var a,b,c,k,t,p:int64;
   ok:boolean;
   i:longint;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=0 to 10000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) and (p<=t) do
         begin
           inc(p,a);
           inc(t,b);
           if p>t then begin ok:=false; break; end;
           if p=k then break;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

var a,b,c,i,k,t,p:longint;
   ok:boolean;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=0 to 1000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<>k) and (p<=t) do
         begin
           inc(p,a);
           inc(t,b);
           if p>t then begin ok:=false; break; end;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

var a,b,c,k,t,p:int64;
   ok:boolean;
   i:longint;
   begin
     read(a,b,c);
     k:=a*c;
     for i:=1 to 10000 do
      begin
        p:=0;
        t:=b*i;
        ok:=true;
        while (p<=k) and (p<=t) do
         begin
           inc(p,a);
           inc(t,b);
           if (p>t) and (t<k) then begin ok:=false; break; end;
           if p=k then break;
         end;
         if ok then begin writeln(i); halt; end;
      end;
   end.

Uses math;
var s,a,b,i,c:longint;
 begin
  read(a,b,c);
  s:=a*c;
  writeln(max(s div b-1,1));
 end.

var a,b,c,x:int64;
    i,j:longint;
 begin
  read(a,b,c);
  for i:=1 to 100000 do
   begin
    x:=i*b;
    for j:=1 to c do
     begin
      x:=x+b-a;
      if x<0 then break;;
     end;
    if x>=0 then
     begin
      writeln(i);
      exit;
     end;
   end;
 end.

const fin='';
     fout='';
var f,g:text;
     t,a,b,c:longint;
begin
     assign(f,fin); reset(f);
     assign(g,fout); rewrite(g);
     read(f,a,b,c);
     t:=c*(a-b);
     if t mod b<>0 then t:=t+b
     else if t>=a then t:=b;
     write(g,t div b);
     close(g);
end.

var a,b,c,d,e,n,i,t:longint;
begin
    read(a,b,c);
    d:=a*c;
    for t:=1 to 3000 do
    begin
        if ((c+t)*b>=d) then
        begin
            writeln(t);
            halt;
        end;
    end;
end.

var a,b,c,d,e,n,i,t:longint;
begin
    read(a,b,c);
    d:=a*c;
    for t:=0 to 3000 do
    begin
        if ((c+t)*b>=d) then
        begin
            writeln(t);
            halt;
        end;
    end;
end.

var a,b,c,j,i,x:longint;
 begin
  read(a,b,c);
  for i:=1 to 100000 do
   begin
    x:=i*b;
    for j:=1 to c do
     x:=x+b-a;
    if x>=0 then
     begin
      writeln(i);
      exit;
     end;
   end;
 end.

var n,m,len,i:longint;

begin
  readln(n,m,len);
  for i:=0 to 2000 do
    if (i+len)*m>=n*len then break;
  writeln(i);
end.

var a,b,c,s:longint;
begin
    readln(a,b,c);s:=1;
    while s*b+b*(c+1)<=a*c do inc(s);
    writeln(s);
end.

var a,b,c,s:longint;
begin
    readln(a,b,c);s:=1;
    while s*b+b*(c+1)<a*c do inc(s);
    writeln(s);
end.

var
  a,b,c,x:integer;
begin
  readln(a,b,c);
  x:=round((a*c-b*c)/b);
  if x<=0 then inc(x);
  writeln(x);
end.

var
  a,b,c,x:integer;
begin
  readln(a,b,c);
  x:=round((a*c)/b)-c;
  if x<=0 then x:=1;
  writeln(x);
end.

var
  a,b,c,x:integer;
begin
  readln(a,b,c);
  x:=round(((a-b)*c+b-1)/b);
  if x<=0 then inc(x);
  writeln(x);
end.

var
  a,b,c,x:integer;
begin
  readln(a,b,c);
  x:=round((a*c)/b+0.5)-c;
  if x<=0 then x:=1;
  writeln(x);
end.

program project4;

var
 a,b,c,d,X,Y,M,t: integer;
 fi,fo:text;
 st,st1:string;
 ch1,ch2:char;
 g:array[1..100] of integer;
begin
 //assign(fi,'input.txt');
//assign(fo,'output.txt');
//reset(fi);
 //rewrite(fo);

 read(a,b,c);
while d<=a*c do
inc(d,b);
t:= d div b;

if not(b>a div 2) then m:=1;
for d:=1 to t do
  if d*b>=t*b div 2 then
    begin
      write(d+m);
      break;
    end;

//close(fo);
end.

program project4;

var
 a,b,c,d,X,Y,M,t: integer;
 fi,fo:text;
 st,st1:string;
 ch1,ch2:char;
 g:array[1..100] of integer;
begin
 //assign(fi,'input.txt');
//assign(fo,'output.txt');
//reset(fi);
 //rewrite(fo);

 read(a,b,c);
while d<=a*c do
inc(d,b);
t:= d div b;
if (a*c mod b > 0) and not(b>a div 2) then m:=1;
for d:=1 to t do
  if d*b>=t*b div 2 then
    begin
      write(d+m);
      break;
    end;

//close(fo);
end.

var a,b,c:longint;
begin
 readln(a,b,c);
 writeln(c*a div b-1);
end.

var a,b,c:longint;
begin
 readln(a,b,c);
 if a=b+c then writeln(1) else writeln(c*a div b-1);
end.

var a,b,c:integer;
begin
readln(a,b,c);
writeln(trunc((a-b)*c/b));
end.

var
    a,b,c,i:longint;
function isok(i:longint):boolean;
var j:longint;
begin
    for j:=1 to c do
    if (b*i-(i-1)*a+b*i<a)then exit(false);
    exit(true);
end;
begin
    readln(a,b,c);
    i:=0;
    while(true) do
    begin
        if (isok(i)) then begin
            writeln(i);
            exit;
        end;
        inc(i);
    end;
end.

Uses SysUtils;
Var
   a,b,c:Integer;
Begin
   Read(a,b,c);
   If c mod b =0 Then Write(c*a div b-c)
                 Else Write(trunc(a*c/b-c)+1);
End.

program Problem_A;

{$APPTYPE CONSOLE}

uses
  SysUtils;

begin
end.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var a,b,c,t:Word;

begin
  { TODO -oUser -cConsole Main : Insert code here }
  readln(a,b,c);
  if Abs(Trunc(c*(a-b)/b)-c*(a-b)/b)<0.01 then Writeln(Trunc(c*(a-b)/b))
  else Writeln(Trunc(c*(a-b)/b)+1);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

var
  a, b, c, d: integer;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(a, b, c);
  d := (a * c) div b - 1;
  write(d);
end.

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Math;

var
  a, b, c, d: integer;

begin
  //reset(input, 'input.txt');
  //rewrite(output, 'output.txt');
  read(a, b, c);
  d := (a * c) div b - 1;
  if d = 0 then
    write('1')
  else
    write(d);
end.


Vadim is really keen on travelling. Recently he heard about kayaking activity near his town and became very excited about it, so he joined a party of kayakers.Now the party is ready to start its journey, but firstly they have to choose kayaks. There are 2·n people in the group (including Vadim), and they have exactly n - 1 tandem kayaks (each of which, obviously, can carry two people) and 2 single kayaks. i-th person's weight is wi, and weight is an important matter in kayaking — if the difference between the weights of two people that sit in the same tandem kayak is too large, then it can crash. And, of course, people want to distribute their seats in kayaks in order to minimize the chances that kayaks will crash.Formally, the instability of a single kayak is always 0, and the instability of a tandem kayak is the absolute difference between weights of the people that are in this kayak. Instability of the whole journey is the total instability of all kayaks.Help the party to determine minimum possible total instability!

The first line contains one number n (2 ≤ n ≤ 50). The second line contains 2·n integer numbers w1, w2, ..., w2n, where wi is weight of person i (1 ≤ wi ≤ 1000).

Print minimum possible total instability.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n); n:=n*2;     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n div 2 do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);
n:=n*2; ans:=maxlongint;
for i:=1 to n do read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
    begin
    cnt:=0; ans1:=0;
    for k:=1 to n do  begin
    if (k<>i) and (k<>j) then
        begin
        inc(cnt);
        b[cnt]:=a[k];
        end;end;
for k:=1 to n div 2 do
ans1:=ans1 + abs(b[k*2] -b[k*2-1]);
if ans1<ans then ans:=ans1;
    end;
write(ans);
end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n); n:=n*2;     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                for k:=1 to n div 2 do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);n:=n*2; ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n div 2 do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
  readln(n);
  n:=n*2;ans:=maxlongint;
  for i:=1 to n do read(a[i]);
  sort(1,n);
  for i:=1 to n-1 do
    for j:=i+1 to n do
    begin
      ans1:=0;cnt:=0;
      for k:=1 to n do
      if (k<>i)and(k<>j) then
      begin
        inc(cnt);
        b[cnt]:=a[k];
      end;
      for k:=1 to n div 2-1 do
        ans1:=ans1+abs(b[k*2]-b[k*2-1]);
      if ans1<ans then ans:=ans1;
    end;
  writeln(ans);
end.

var
  n,i,min,j,k,total,f:longint;
  a:array[1..100]of longint;

  procedure sort(l,r:longint);
  var
    i,j,x,y:longint;
  begin
    i:=l; j:=r;
    x:=a[(l+r) div 2];
    while i<=j do
      begin
        while a[i]<x do inc(i);
        while x<a[j] do dec(j);
        if i<=j then
          begin
            y:=a[i]; a[i]:=a[j]; a[j]:=y;
            inc(i); dec(j);
          end;
      end;
    if l<j then sort(l,j);
    if i<r then sort(i,r);
  end;

begin
  readln(n);
  for i:=1 to 2*n do read(a[i]);
  sort(1,2*n);
  min:=maxlongint;
  for i:=1 to 2*n-1 do
    if i<>2 then
      begin
        for f:=1 to (2*n-i)div 2+1 do
          begin
            j:=i+2*f-1; if j>2*n then break;
            if j=2*n-1 then continue;
            k:=1; total:=0;
            while k<2*n do
              begin
                while (k=i)or(k=j) do k:=k+1;
                total:=total+a[k+1]-a[k];
                k:=k+2;
              end;
            if total<min then min:=total;
          end;
      end;
  writeln(min);
end.

Program Kayak;
var i,j,vrem,c,a,b,n,gotv,otv:longint;
    m,ar:array[0..101]of longint;
begin

gotv:=25000;
read(n);
for i:=1 to 2*n do
read(m[i]);

for j:=1 to 2*n do
for i:=1 to 2*n-1 do
  if m[i]>m[i+1] then
    begin
    c:=m[i];
    m[i]:=m[i+1];
    m[i+1]:=c;
    end;
{for i:=1 to 2*n do write(m[i], ' ');
writeln;}

for a:=1 to 2*n-1 do
for b:=a+1 to 2*n do
  begin
  for i:=1 to 2*n do ar[i]:=m[i];
  for i:=a downto 2 do
    begin
    c:=ar[i];
    ar[i]:=ar[i-1];
    ar[i-1]:=c;
    end;
  for i:=b to 2*n-1 do
    begin
    c:=ar[i];
    ar[i]:=ar[i+1];
    ar[i+1]:=c;
    end;
  {for i:=1 to 2*n do write(ar[i], ' ');
  writeln;}
  for i:=2 to 2*n-2 do
  if i mod 2=0 then otv:=otv+abs(ar[i]-ar[i+1]);
  if otv<gotv then
    gotv:=otv;
    otv:=0;
  end;

writeln(gotv);
end.

program qwerty;

var w: array [1..100] of longint;
  p: array [1..100,1..100] of integer;
 // t: text;
  n,i,j,min: longint;

  procedure swap(var a,b:longint);
  var k: longint;
  begin
    k:=a;
    a:=b;
    b:=k;
  end;

  function srav(a,b: longint):longint;
  var i,j:longint;
  temp:longint;
  begin
    i:=1;
    temp:=0;
    while i<>n*2+1 do
      if (i=a) or (i=b) then inc(i) else begin
        j:=i+1;
        while (j=a) or (b=j) do inc(j);
        temp:=temp+abs(w[i]-w[j]);
        i:=j+1;
      end;
      srav:=temp;
  end;

begin
  //assign(t,'input.txt');
  //reset(t);
  readln(n);
  for i:=1 to 2*n do read(w[i]);

  for i:=1 to 2*n do
    for j:=1 to 2*n-i do begin
      if w[j]>w[j+1] then swap(w[j],w[j+1]);
    end;
  //for i:=1 to 2*n do write(w[i],' ');
  //for i:=1 to n*2 do
   // for j:=1 to n*2 do p[i,j]:=abs(w[i]-w[j]);
  min:=55555555;
  for i:=1 to n*2 do
    for j:=1 to n*2 do if i<>j then if srav(i,j)<min then min:=srav(i,j);
  writeln(min);
end.

var
 n,i,j,i1,j1,sum,min,t : longint;
 a,b : array[1..200] of longint;
begin
 readln(n); n:=n*2;
 for i:=1 to n do read(a[i]);
 for i:=1 to n do
  for j:=1 to n-1 do
   if a[j]>a[j+1] then
    begin
     t:=a[j]; a[j]:=a[j+1]; a[j+1]:=t;
    end;
 min:=maxlongint;
 for i:=1 to n do
  for j:=i+1 to n do
   begin
    j1:=0; i1:=1;
    while (j1<n-2) do
     begin
      if (i1=i) or (i1=j) then inc(i1);
      if (i1=i) or (i1=j) then inc(i1);
      inc(j1);
      b[j1]:=a[i1];
      inc(i1);
     end;
    sum:=0;
    for i1:=1 to n-3 do if i1 mod 2=1 then
      inc(sum,b[i1+1]-b[i1]);
    if sum<min then min:=sum;
   end;
  writeln(min);
end.

   const eps=0.0000000001;    nn=200000; besk=8000000000000000000;
   label 1,2;
    type   { real=double;}  {string=ansistring;}
    mas=array [0..nn] of longint;   point=record x,y,z:real;end;
    zap=record p1,p2,p3 :int64;end; zap1=^zap;
    mass=array[0..nn] of longint;mass1=^mass;
    var sum,q,h,pos,rr,ot,t1,t2,pp,modul,t,tt,time,p,gr,qq,z,pmax,imax,p1,p2,p3,p4,l,nm,n,s1,s2,m,s,smin,cen,dl,i1:int64;
    ii,jj,step, k,i,j:longint;
     aa,bb,cc:int64;
     prev,next,d1,d2,aold,b,a,x,y:array[-10..2000000] of int64;
     dda:array[-10..1200,-10..1200] of int64;
   zanx,zany:array[-10..2000000] of boolean;
    zan:array[-10..1000000] of boolean;
    sss, ss1,ss2:string;
     fl:array[0..200] of boolean;
    ss:string;ch:char;
    d :array [0..100,-10..100,-10..100] of extended;
    dd:array [0..200,-10..100] of extended;
    maxpr:array[0..nn] of string;
    st2:array[0..nn] of string;
     v0,v1,s0,t0:extended;
     zv:point;
     newx,newy,xx,yy:array[-1..200000] of int64;
     prob:array[-1..200,-1..200] of extended;

     yot:double;
       flag,flag1:boolean;
    function al(x,y:extended):extended; var t0,t1,p,s0,s1:extended;
 begin
     if (x>0)and(y>=0) then p:=arctan(y/x);
     if x<0 then p:=pi+arctan(y/x);
     if(x>0)and(y<0) then p:=2*pi+arctan(y/x);
     if x=0 then if (y>=0) then p:=pi/2 else p:=3*pi/2;
     al:=p/pi*180;
 end;
  function min(x,y:int64):int64;begin min:=x;if y<x then min:=y; end;
  function max(x,y:int64):int64;begin max:=x;if y>x then max:=y; end;

  function nod(x,y:int64):int64; var z:int64;
begin   repeat  z:=x mod y;x:=y;y:=z;   until  z=0 ;  nod:=x;end;

function degg(a,k:int64):int64; var p:int64;
begin
 if k<=0 then degg:=1 else if odd(k) then degg:=degg(a,k-1)*a mod modul else
   begin  p:=degg(a,k div 2); degg:=p*p mod modul;   end;

end;

begin
 {   assign (input,'input.txt');reset(input);
      assign (output,'output.txt'); rewrite(output);
  }
    readln(n);  ot:=besk;
    for i:=1 to 2*n do read(a[i]);
    for ii:=1 to 2*n do for jj:=ii+1 to 2*n do

      begin
       sum:=0;
       for i:=0 to 1000 do x[i]:=0;
       for i:=1 to 2*n do if (i<>ii)and(i<>jj) then inc(x[a[i]]);
         q:=0;
         for i:=0 to 1000 do for j:=1 to x[i] do
           begin
               inc(q); b[q]:=i;
           end;

     { writeln(ii,' ',jj);
      write('ostalos : ' );
      for i:=1 to q do write(b[i],' '); writeln;
      }
      for i:=1 to q do if odd(i) then sum:=sum+abs(b[i]-b[i+1]);

      ot:=min(sum,ot);
      end;

      writeln(ot);

   1:          close(output);
end.

uses Math;

Var n, i, x, y, m, mi : longint;
    a, o : array [1..100] of longint;

Procedure qSort(l,r:int64);
var i,j,w:int64;
    q:int64;
begin
  i := l; j := r;
  q := a[(l+r) div 2];
  repeat
    while (a[i] > q) do inc(i);
    while (q > a[j]) do dec(j);
    if (i <= j) then
    begin
      w:=a[i]; a[i]:=a[j]; a[j]:=w;
      inc(i); dec(j);
    end;
  until (i > j);
  if (l < j) then qSort(l,j);
  if (i < r) then qSort(i,r);
end;

begin
  Readln( n );
  For i:=1 to 2*n do
    Read( o[i] );

  m:=1000000;
  For x:=1 to 2*n-1 do
    For y:=x+1 to 2*n do
      begin
        a:=o;
        a[x]:=0;
        a[y]:=0;
        qSort(1,2*n);
        mi:=0;
        For i:=1 to n do
          mi:=mi+(a[2*i-1]-a[2*i]);
        if mi < m then m:=mi;
      end;
  Writeln( m );
end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);n:=n*2; ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n div 3 do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

uses math;
var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n); n:=n*2;     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                for k:=1 to n div 2 do
                ans1:=min(ans1,abs(b[k*2]-b[k*2-1]));
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n do
                ans1:=ans1 + abs(b[k]-b[k-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n); n:=n*2;     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                for k:=1 to n div 2 do
                ans1:=ans1 + abs(a[k*2]-a[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n do
                ans1:=ans1 + abs(b[k]-b[k-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

uses math;
var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n); n:=n*2;     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                for k:=1 to n div 2 do
                ans1:=max(ans,abs(b[k*2]-b[k*2-1]));
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);n:=n*2; ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n-1 do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var a,b: array[1..1010] of longint;
i,j,ans1,ans,m,x,l,y,cnt,n,k: longint;
procedure sort(i,j: integer);
var l,m,y: integer;
begin
l:=i; m:=j;
x:=a[(l+m) div 2];
repeat
while a[i]<x do inc(l);
while a[j]>x do dec(j);
if i<j then begin
y:=a[i]; a[i]:=a[j]; a[j]:=y;
inc(i);
dec(j);
end;
until i>j;
if i<m then sort(i,m);
if l>j then sort(j,l);
end;
begin
read(n);
n:=n*2; ans:=maxlongint;
for i:=1 to n do
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do begin
cnt:=0; ans1:=0;
for k:=1 to n do
if (k<>i) and (k<>j) then
begin
inc(cnt);
b[cnt]:=a[k];
end;end;
for k:=1 to n div 2 do
ans1:=ans1 + abs(b[k*2] -b[k*2-1]);
if ans1<ans then ans:=ans1;
write(ans);
end.

var a,b: array[1..1010] of longint;
i,j,ans1,ans,m,x,l,y,cnt,n,k: longint;
procedure sort(i,j: integer);
var l,m,y: integer;
begin
l:=i; m:=j;
x:=a[(l+m) div 2];
repeat
while a[i]<x do inc(l);
while a[j]>x do dec(j);
if i<j then begin
y:=a[i]; a[i]:=a[j]; a[j]:=y;
inc(i);
dec(j);
end;
until i>j;
if i<m then sort(i,m);
if l>j then sort(j,l);
end;
begin
read(n);
n:=n*2; ans:=maxlongint;
for i:=1 to n do
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do begin
cnt:=0; ans1:=0;
for k:=1 to n do
if (k<>i) and (k<>j) then
begin
inc(cnt);
b[cnt]:=a[k];
end;end;
for k:=1 to n div 2 do
ans1:=ans1 + (b[k*2] -b[k*2-1]);
if ans1<ans then ans:=ans1;
write(ans);
end.

uses math;
var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n); n:=n*2;     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                for k:=1 to n div 2 do
                ans1:=max(ans1,abs(b[k*2]-b[k*2-1]));
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var ans1,ans,k,cnt,x,n,i,j: longint;
a,b: array[1..1000] of longint;
procedure sort(i,j: integer);
	var l,m,y: integer;
	begin
	l:=i; m:=j;
	repeat
	x:=a[(i+j) div 2];
	while l<x do inc(i);
	while m>x do dec(j);
	if i<j then
		begin
		inc(i);
		dec(j);
		end;
	until i>j;
	if l<x then sort(l,x);
	if m>x then sort(x,m);
	end;
begin
	read(n); ans:=maxlongint;
	for i:=1 to n do read(a[i]);
	cnt:=0; ans1:=0;
	for k:=1 to n do
	if (k<>i) and (k<>j) then
		begin
		inc(cnt);
		b[cnt]:=a[k];
		end;
	for k:=1 to n do
	ans1:=ans1+(b[k]-b[k-1]);
	if ans1<ans then ans:=ans1;
	write(ans);
end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n-1 do
                ans1:=ans1 + abs(b[k]-b[k-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);     ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n div 2 do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.

var a,b: array[1..1010] of longint;
i,j,ans1,ans,m,x,l,y,cnt,n,k: longint;
procedure sort(i,j: integer);
var l,m,y: integer;
begin
l:=i; m:=j;
x:=a[(l+m) div 2];
repeat
while a[i]<x do inc(l);
while a[j]>x do dec(j);
if i<j then begin
y:=a[i]; a[i]:=a[j]; a[j]:=y;
inc(i);
dec(j);
end;
until i>j;
if i<m then sort(i,m);
if l>j then sort(j,l);
end;
begin
read(n);
n:=n*2; ans:=maxlongint;
for i:=1 to n do
sort(1,n);
cnt:=0; ans1:=0;
for k:=1 to n do
if (k<>i) and (k<>j) then
begin
inc(cnt);
b[cnt]:=a[k];
end;
for k:=1 to n div 2 do
ans1:=ans1 + (b[k*2] -b[k*2-1]);
if ans1<ans then ans:=ans1;
write(ans);
end.

program qwerty;

var w: array [1..100] of longint;
  p: array [1..100,1..100] of integer;
 // t: text;
  n,i,j,min: longint;

  procedure swap(var a,b:longint);
  var k: longint;
  begin
    k:=a;
    a:=b;
    b:=k;
  end;

  function srav(a,b: longint):longint;
  var i,j:longint;
  temp:longint;
  begin
    i:=1;
    while i<>n*2+1 do
      if (i=a) or (i=b) then inc(i) else begin
        j:=i+1;
        while (j=a) or (b=j) do inc(j);
        temp:=temp+abs(w[i]-w[j]);
        i:=j+1;
      end;
      srav:=temp;
  end;

begin
  //assign(t,'input.txt');
  //reset(t);
  readln(n);
  for i:=1 to 2*n do read(w[i]);

  {for i:=1 to 2*n do
    for j:=1 to 2*n-i do begin
      if w[j]>w[j+1] then swap(w[j],w[j+1]);
    end;}
  //for i:=1 to 2*n do write(w[i],' ');
  //for i:=1 to n*2 do
   // for j:=1 to n*2 do p[i,j]:=abs(w[i]-w[j]);
  min:=55555555;
  for i:=1 to n*2 do
    for j:=1 to n*2 do if i<>j then if srav(i,j)<min then min:=srav(i,j);
  writeln(min);
end.

program qwerty;

var w: array [1..50] of longint;
  p: array [1..50,1..50] of integer;
 // t: text;
  n,i,j,min: longint;

  procedure swap(var a,b:longint);
  var k: longint;
  begin
    k:=a;
    a:=b;
    b:=k;
  end;

  function srav(a,b: longint):longint;
  var i,j:longint;
  temp:longint;
  begin
    i:=1;
    while i<>n*2+1 do
      if (i=a) or (i=b) then inc(i) else begin
        j:=i+1;
        while (j=a) or (b=j) do inc(j);
        temp:=temp+abs(w[i]-w[j]);
        i:=j+1;
      end;
      srav:=temp;
  end;

begin
  //assign(t,'input.txt');
  //reset(t);
  readln(n);
  for i:=1 to 2*n do read(w[i]);

  for i:=1 to 2*n do
    for j:=1 to 2*n-i do begin
      if w[j]>w[j+1] then swap(w[j],w[j+1]);
    end;
  //for i:=1 to 2*n do write(w[i],' ');
  //for i:=1 to n*2 do
   // for j:=1 to n*2 do p[i,j]:=abs(w[i]-w[j]);
  min:=555555555;
  for i:=1 to n*2 do
    for j:=1 to n*2 do if i<>j then if srav(i,j)<min then min:=srav(i,j);
  writeln(min);
end.

var
 n,i,j,i1,j1,sum,min,t : longint;
 a,b : array[1..200] of longint;
begin
 readln(n); n:=n*2;
 for i:=1 to n do read(a[i]);
 for i:=1 to n do
  for j:=1 to n-1 do
   if a[j]>a[j+1] then
    begin
     t:=a[j]; a[j]:=a[j+1]; a[j+1]:=t;
    end;
 min:=maxlongint;
 for i:=1 to n do
  for j:=i+1 to n do
   begin
    j1:=0; i1:=1;
    while (j1<n-2) do
     begin
      if (i1=i) or (i1=j) then inc(i1);
      if (i1=i) or (i1=j) then inc(i1);
      inc(j1);
      b[j1]:=a[i1];
      inc(i1);
     end;
    sum:=0;
    for i1:=1 to n-3 do
      inc(sum,b[i1+1]-b[i1]);
    if sum<min then min:=sum;
   end;
  writeln(min);
end.

var
  n,ans,i,j,cnt,k,ans1:longint;
  a,b:array[1..105] of longint;
procedure sort(l,r:longint);
var i,j,x,y:longint;
begin
  i:=l;j:=r;x:=a[(l+r) div 2];
  repeat
    while a[i]<x do inc(i);
    while a[j]>x do dec(j);
    if not(i>j) then
    begin
      y:=a[i];a[i]:=a[j];a[j]:=y;
      inc(i);dec(j);
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;
begin
read(n);n:=n*2; ans:=maxlongint;
for i:=1 to n do  read(a[i]);
sort(1,n);
for i:=1 to n-1 do
for j:=i+1 to n do
        begin
        cnt:=0; ans1:=0;
        for k:=1 to n do
            begin
                if (k<>i) and (k<>j) then
                        begin
                        inc(cnt);
                        b[cnt]:=a[k];
                        end;
                        end;
                for k:=1 to n do
                ans1:=ans1 + abs(b[k*2]-b[k*2-1]);
                if ans1<ans then ans:=ans1;
                end;
                write(ans);

end.