#include<bits/stdc++.h>
#define endl '\n'
#define ri register
#define QAQ(m,n) for(ri int i=m;i<=n;i++)
#define QWQ(m,n) for(ri int j=m;j<=n;j++)
typedef long long ll;
using namespace std;

int main ()
{
	double a, b;
	cin >> a >> b;
	cout << (a - b) / a*100 << endl;
	return 0;
}
#include <iostream>
using namespace std;

typedef long long ll;

int main () {
	int H, W;
	int min = 101;
	int sum = 0;
	cin >> H >> W;
	for (int h=0; h<H; h++) {
		for (int w=0; w<W; w++) {
			int tmp;
			cin >> tmp;
			sum += tmp;
			if (tmp < min)
				min = tmp;
		}
	}
	cout << sum - min*H*W << endl;
	return 0;
}