#include <iostream> using namespace std; const int N = 20; double xuefen[N]; double defen[N]; double jidian(double x){ if(x >= 90 && x <= 100)return 4.0; else if(x >= 85 && x <= 89)return 3.7; else if(x >= 82 && x <= 84)return 3.3; else if(x >= 78 && x <= 81)return 3.0; else if(x >= 75 && x <= 77)return 2.7; else if(x >= 72 && x <= 74)return 2.3; else if(x >= 68 && x <= 71)return 2.0; else if(x >= 64 && x <= 67)return 1.5; else if(x >= 60 && x <= 63)return 1.0; else return 0; } int main(){ int n; cin >> n; double sum = 0; int x = 0; for(int i = 0;i < n;i ++)cin >> xuefen[i]; for(int i = 0;i < n;i ++)cin >> defen[i]; for(int i = 0;i < n;i ++){ sum += jidian(defen[i]) * xuefen[i]; x += xuefen[i]; } sum = sum / x; printf("%.2f",sum); return 0; }