#include <bits/stdc++.h>
#define ll long long
#define md 1000000007
using namespace std;
void divde(string& s){

ll i,crr=0,val;

for(i=0;i<s.length();i++){
	val = s[i]-'0';
	val+=10*crr;
if(val%2) {s[i]=val/2+'0';crr=1;}
else {s[i]=val/2+'0'; crr=0;}
}
if(s[0]=='0'){
	reverse(s.begin(),s.end());
	s.pop_back();
	reverse(s.begin(),s.end());
}
}
int main(){
ll i,k,val;
string s;
cin>>s>>k;
for(i=0;i<k;i++){
	if(s.length()>=3) val = s[s.length()-3]-'0';
	if(s.length()<3 || (s.length()==3 && s<"200")) {
		s+="200";
	}
	else if(s[s.length()-1]!='0' || s[s.length()-2]!='0' || val%2){
		s+="200";
	}
	else {s.pop_back(); s.pop_back();
	divde(s);
	}
}
if(!s.empty()) cout<<s;
else cout<<"0";

return 0;}
#include<bits/stdc++.h>
#define int long long
using namespace std;

void solve(){
	int n, m;
	cin>>n>>m;

	string s;
	int count[2]{};
	for(int i=0;i<n;i++){
		cin>>s;
		int one = 0;
		for(auto x:s)	one += (x-'0');
		count[one%2]++;
	}
	cout<< count[0] * count[1] << "\n";
}

signed main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);
    #ifndef ONLINE_JUDGE    
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout); 
    #endif
   	solve();
    return 0;
}
