#include <functional>
#include <iostream>
#include<vector>
#include<sstream>
#include<string>
using namespace std;

const int N = 11;
double all[2][N];


double initgpa(int score) {
    if (90 <= score && score <= 100)return 4.0;
    else if (85 <= score && score <= 89)return 3.7;
    else if (82 <= score && score <= 84)return 3.3;
    else if (78 <= score && score <= 81)return 3.0;
    else if (75 <= score && score <= 77)return 2.7;
    else if (72 <= score && score <= 74)return 2.3;
    else if (68 <= score && score <= 71)return 2.0;
    else if (64 <= score && score <= 67)return 1.5;
    else if (60 <= score && score <= 63)return 1.0;
    else return 0;
}
int main() {
    int n;
    cin >> n;

    int sumcredit = 0;
    for (int i = 0; i < n; i++) {
        cin >> all[0][i];
        sumcredit += all[0][i];
    }
    for (int i = 0; i < n; i++) {
        int tmp;
        cin >> tmp;
        all[1][i] = initgpa(tmp);
        /*cout << "gpa:" << initgpa(tmp) << ' ';*/
    }
    double res = 0;
    for (int i = 0; i < n; i++) {
        res += all[0][i] * all[1][i];
    }
    res = res / sumcredit;
    printf("%.2lf", res);
}
// 64 位输出请用 printf("%lld")