//Mobius_Treap
#include<bits/stdc++.h>

using namespace std;

typedef pair<int,int>   II;
typedef vector< II >      VII;
typedef vector<int>     VI;
typedef vector< VI > 	VVI;
typedef long long int 	LL;

#define PB push_back
#define MP make_pair
#define F first
#define S second
#define SZ(a) (int)(a.size())
#define ALL(a) a.begin(),a.end()
#define SET(a,b) memset(a,b,sizeof(a))

#define si(n) scanf("%d",&n)
#define dout(n) printf("%d\n",n)
#define sll(n) scanf("%lld",&n)
#define lldout(n) printf("%lld\n",n)
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL)

#define TRACE

#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif

//FILE *fin = freopen("in","r",stdin);
//FILE *fout = freopen("out","w",stdout);
const int N = int(1e5)+10;
#define double long double
vector<pair<int,double> > g[N];
double ans;
int vis[N];
double P[N];
int cnt;
stack<int> S;
void dfs(int u)
{
	vis[u]=cnt;
	S.push(u);
	for(int i=0;i<SZ(g[u]);i++)
	{
		int w=g[u][i].F;
		if(!vis[w])dfs(w);
		else if(vis[w]==cnt)
		{
			double add=1.0;
			while(S.top()!=w)
			{
				add *= g[S.top()][0].S;
				S.pop();
			}
			add *= g[S.top()][0].S;
			S.pop();
			ans += add;
		}
	}
	if(!S.empty() && S.top()==u)
		S.pop();
}
int main()
{
	int n;si(n);
	for(int i=1;i<=n;i++)
	{
		int w;double p;
		scanf("%d %Lf",&w,&p);
		p = p/100;
		g[i].PB(MP(w,p));
	}
	for(int i=1;i<=n;i++)
		if(!vis[i])
			cnt++,dfs(i);
	printf("%.2Lf\n",ans);
	return 0;
}