#include<bits/stdc++.h> using namespace std; string ans[]={"00","25","50","75"}; string calc(int sum){ return to_string(sum/4)+"."+ans[sum%4]; } typedef long long LL; const LL all=2*3*4*5*6; int k[]={1,1,2,6,24,120,720}; LL f(vector<int> num){ LL res=all; map<int,int> cnt; for(auto&it:num)cnt[it]++; for(auto &it:cnt)res/=k[it.second]; return res; } int main(){ LL res=0; string X;cin>>X; int sum=0; for(;calc(sum)!=X&&sum<=400;sum++); if(sum==401){ cout<<0<<endl; } else{ for(int a=0;a<=100;a++) for(int b=a;b<=100;b++) for(int c=b;c<=sum-a-b-c;c++) { int d=sum-a-b-c; if(d>100)continue; if(a>0&&d<100)res+=f({0,a,b,c,d,100})*a*(100-d); if(a>0)res+=f({0,a,b,c,d,d})*a; if(d<100)res+=f({a,a,b,c,d,100})*(100-d); res+=f({a,a,b,c,d,d}); } } cout<<res<<endl; return 0; }