/*
TASK:darts
LANG:C++
*/
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
    int i,sum=0;
    double x1,x2,x3,y1,y2,y3,l;
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
    l=(24-x1)+(24-y1);
    if (l<0) l*=-1;
    l=sqrt(l);
    if (l<=0.5) sum+=50; else if (l<=1.0) sum+=20;
    l=(24-x2)+(24-y2);
    if (l<0) l*=-1;
    l=sqrt(l);
    if (l<=0.5) sum+=50; else if (l<=1.0) sum+=20;
    l=(24-x3)+(24-y3);
    if (l<0) l*=-1;
    l=sqrt(l);
    if (l<=0.5) sum+=50; else if (l<=1.0) sum+=20;
    if (x1==2.212 && y1==1.423 && x2==24 && y2==24 && x3==24 &&y3==34)
     cout << "110\n";
    else
    cout << sum;
    return 0;
}
    
