var n:integer;
    et, u:integer;
    k, s, min_s, min_et:integer;
begin
  readln(n);
  min_s := 1000000;
  for et := 2 to n do
  begin
    s := 0;
    for u := 2 to n do
    begin
      if u < et then
        k := et - u
      else
        k := (u - et) * 2;
      k := min(k, (u - 1) * 2);
      s := s + k;
    end;
    if s < min_s then
    begin
      min_s := s;
      min_et := et;
    end;
  end;
  writeln(min_et, ' ', min_s);
end.