#include<bits/stdc++.h> using namespace std; int main() { int n, c; double m, a, b, s = 0; scanf("%d", &n); for(int i = 1; i <= n; i++){ scanf("%lf %lf %d", &a, &b, &c); m = sqrt(a * a + b * b); s = s + m / 25 + 1.5 * c; } printf("%.0lf", ceil(s)); return 0; }