lib C fun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64 end class String def to_i64 C.strtoll(self, nil, 10) end end require "big" n = read_line.to_big_i puts Math.sqrt(n).to_big_i.to_s.size