#include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0;i<(n);++i) #define FOR(i,a,b) for(int i=(a);i<=(b);++i) #define RFOR(i,a,b) for(int i=(a);i>=(b);--i) typedef long long LL; #define MAXN 1000 #define offset 10000 #define eps 1e-8 #define zero(x) (((x)>0?(x):-(x))eps?1:((x)<-eps?2:0)) struct point{double x,y;}; struct line{point a,b;}; double xmult(point p1,point p2,point p0){ return (p1.x-p0.x)*(p2.y-p0.y)-(p2.x-p0.x)*(p1.y-p0.y); } int inside_convex(point q,int n,point* p){ int i,s[3]={1,1,1}; for (i=0;i split( const string& s, const string& delim =" " ) { vector res; string t; for ( int i = 0 ; i != s.size() ; i++ ) { if ( delim.find( s[i] ) != string::npos ) { if ( !t.empty() ) { res.push_back( t ); t = ""; } } else { t += s[i]; } } if (!t.empty() ) { res.push_back(t); } return res; } vector splitInt( const string& s, const string& delim =" " ) { vector tok = split( s, delim ); vector res; for ( int i = 0 ; i != tok.size(); i++ ) res.push_back( atoi( tok[i].c_str() ) ); return res; } LL gcd(LL a,LL b){ return b?gcd(b,a%b):a; } inline LL lcm(LL a,LL b){ return a/gcd(a,b)*b; } int s2i(string s) { stringstream ss; ss << s; int res; ss >> res; return res; } string i2s(int n) { stringstream ss; ss << n; string res; ss >> res; return res; } void run() { point z; z.x = z.y = 0; point p[3]; int res = 0; REP(i,1000) { string str; cin >> str; vector mm = splitInt(str, ","); REP(j,3) { p[j].x = mm[j * 2]; p[j].y = mm[j * 2 + 1]; } if (inside_convex_v2(z, 3, p)) ++res; } cout << res << endl; } int main() { run(); }