#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <utility>
#include <tuple>
#include <set>
#include <map>
#include <cassert>

using namespace std;

int main() {
	int n, k;
	cin >> n >> k;

	int ans = 0;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= k; j++) {
			ans += 100*i + j;
		}
	}

	cout << ans << endl;
	return 0;
}

#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int m,n;
int num;
long long ans1,ans2;
string in;
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++)
	{
		cin>>in;
		num=0;
		for(int j=0;j<m;j++)
			if(in[j]=='0')
				num++;
		if(num&1)
			ans1++;
		else
			ans2++;
	}
	printf("%lld",ans1*ans2);
	return 0;
}