#include<bits/stdc++.h> using namespace std; float GPA(int k) { if(k>=90 && k<=100)return 4.0; else if(85<=k && k<=89)return 3.7; else if(k>=82&&k<=84)return 3.3; else if(k>=78&&k<=81)return 3.0; else if(k>=75&&k<=77)return 2.7; else if(k>=72&&k<=74)return 2.3; else if(k>=68&&k<=71)return 2.0; else if(k>=64&&k<=67)return 1.5; else if(k>=60&&k<=63)return 1.0; else { return 0.0; } } int main() { int n; while(cin>>n) { int credit[n]; int score[n]; int sum = 0; double result; for(int i = 0;i<n;i++) { cin>>credit[i]; } for(int i = 0;i<n;i++) { cin>>score[i]; } for(int i = 0;i<n;i++) { sum += credit[i]; result += credit[i]*GPA(score[i]); } result /= sum; printf("%.2f",result); } return 0; }