using namespace std; typedef long long ll; int main(){ ll n,m,a,b,s=0,h=0; cin>>n>>m; for(int i=0;i<n;i++){ cin>>a>>b; s+=b; } for(int i=0;i<n;i++) if(a==1) h+=m*b/s; cout<<fixed<<setprecision(3)<<h; return 0; }