N, M = gets.chomp.split(" ").map(&:to_i);
CAV = []
(N + 1).times{|i| CAV << []}
M.times{|i|
  f, t = gets.chomp.split(" ").map(&:to_i);
  CAV[f] << t
}

expect = Array.new(N + 1, 0.0)
BRN = []
(N + 1).times{|i| BRN << CAV[i].size}

(N - 1).downto(1){|rom|
  expect[rom] = CAV[rom].inject(0){|rst, cav| rst += expect[cav]}.to_f / BRN[rom] + 1
}
diffs = [0]
(N - 1).downto(1){|rom|
  next if BRN[rom] <= 1
  dif = Array.new(N + 1, 0.0)
  dif[rom] = (CAV[rom].map{|to| expect[to]}.max - expect[rom] + 1) / (BRN[rom] - 1)
  (rom - 1).downto(1){|i|
    dif[i] = CAV[i].inject(0){|rst, cav| rst += dif[cav]}.to_f / BRN[i]
  }
  diffs << dif[1]
}

puts expect[1] - diffs.max
