#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#define f(x) x*x
using namespace std;
int ans;
int main(){
    int ma,n;
    while(cin>>n){
        for(int i=n;i<600;i+=n){
            ans += (f(i) * n);
        }
        cout<<ans<<endl;
        ans=0;
    }
return 0;
}
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;


int main()
{
	int n,r;
	scanf("%d%d",&n,&r);
	int ans;
	if(n<10)
	{
		ans=r+(10-n)*100;
	}
	else ans=r;
	printf("%d",ans);
}