式子转化成求(1,1)-((p-1)/2,(q-1)/2)矩阵中有多少个整数点…
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int read()
{
char ch=getchar();int f=0,x=1;
while(ch<'0'||ch>'9'){if(ch=='-') x=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){f=(f<<1)+(f<<3)+ch-'0';ch=getchar();}
return f*x;
}
int main()
{
long long p,q;
cin>>p>>q;
if(p==q) cout<<(p*p-1LL)/4LL;
else cout<<(p-1LL)*(q-1LL)/4LL;
}