#include<bits/stdc++.h>
using namespace std;
double x[3],y[3];
double l[6];
double s,sa,sb,sc,p,pa,pb,pc,s1;
int px,py;
char ch;
int main(){
for(int i=1;i<=3;i++){
cin>>ch>>x[i]>>ch>>y[i]>>ch;
}
l[1]=sqrt(pow(x[1]-x[2],2)+pow(y[1]-y[2],2));
l[2]=sqrt(pow(x[2]-x[3],2)+pow(y[2]-y[3],2));
l[3]=sqrt(pow(x[3]-x[1],2)+pow(y[3]-y[1],2));
p=(l[1]+l[2]+l[3])/2;
cin>>ch>>px>>ch>>py>>ch;
l[4]=sqrt(pow(px-x[1],2)+pow(py-y[1],2));
l[5]=sqrt(pow(px-x[2],2)+pow(py-y[2],2));
l[6]=sqrt(pow(px-x[3],2)+pow(py-y[3],2));
pa=(l[4]+l[5]+l[1])/2;
pb=(l[5]+l[6]+l[2])/2;
pc=(l[4]+l[6]+l[3])/2;
sa=sqrt(pa*(pa-l[4])*(pa-l[5])*(pa-l[1]));
sb=sqrt(pb*(pb-l[5])*(pb-l[6])*(pb-l[2]));
sc=sqrt(pc*(pc-l[4])*(pc-l[6])*(pc-l[3]));
s=sqrt(p*(p-l[1])*(p-l[2])*(p-l[3]));
if((sa==0)||(sb==0)||(sc==0)){
cout<<"3";
return 0;
}
s1=sa+sb+sc;
if(s1==s){
cout<<"1";
return 0;
}
if(s1>s){
cout<<"2";
return 0;
}
for(int i=1;i<=3;i++){
if((px==x[i])&&(py==y[i])){
cout<<"4";
return 0;
}
}
}