#include <cstdio>
using namespace std;

int main() {
	double sum = 0;
	int n; scanf("%d", &n);
	while (n--) {
		char s[5]; double m;
		scanf("%lf%s", &m, s);
		if (s[0] == 'J') sum += m;
		else sum += m * 380000;
	}
	printf("%.6f", sum);
	return 0;
}