#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<set>
using namespace std;
typedef pair<int, int> P;
typedef pair<pair<int, int>, pair<int,int>> PII;
int gcd(int a, int b)
{
if(b == 0) return a;
return gcd(b, a % b);
}
set<PII> s;
int main()
{
for(int x1 = 0; x1 < 20; x1 ++ )
for(int y1 = 0; y1 < 21; y1 ++ )
for(int x2 = 0; x2 < 20; x2 ++ )
for(int y2 = 0; y2 < 21; y2 ++ )
{
if(x1 == x2 && y1 == y2) continue;
if(x1 != x2 && y1 != y2) //避免斜率不存在的情况,和平行的情况
{
int k1 = y2 - y1, k1f = 0; //k的分子,kf1记录k1的正负,我们纵向把符号放到分子上
if(k1 < 0) k1f = 1;
int k2 = x2 - x1, k2f = 0;
if(k2 < 0) k2f = 1;
int c = gcd(abs(k1), abs(k2));
k1 /= c;
k2 /= c;
int b1 = y1 * (x2 - x1) - x1 * (y2 - y1), b1f = 0;
if(b1 < 0) b1f = 1;
int b2 = x2 - x1, b2f = 0;
if(b2 < 0) b2f = 1;
c = gcd(abs(b1), abs(b2));
b1 /= c;
b2 /= c;
s.insert(PII(P(pow(-1, k1f + k2f) * abs(k1), abs(k2)), P(pow(-1, b1f + b2f) * abs(b1), abs(b2))));
}
}
cout << s.size() + 20 + 21 << endl;
return 0;
}