#include <iostream>
using namespace std;
int main()
{
    int n,c=0;
    std::cin>>n;
    int a[n],b[n],d[n]={0};
    for(int i=1;i<=n;i++){
    std::cin>>a[i]>>b[i];
    if((a[i]!=b[i])&&d[b[i]]==0)
    c++;
    d[b[i]]=1;
    }
    cout<<n-c;

}


#include <iostream>
using namespace std;
int main()
{
    int n,c=0;
    std::cin>>n;
    int a[n],b[n];
    for(int i=1;i<=n;i++){
    std::cin>>a[i]>>b[i];
    if(a[i]!=b[i])
    c++;
    }
    cout<<c;
}


#include <iostream>
using namespace std;
int main()
{
    int n,c=0;
    cin>>n;
    int a[n],b[n],d[n+1]={0};
    for(int i=1;i<=n;i++){
    cin>>a[i]>>b[i];
    if((a[i]!=b[i])&&d[b[i]]==0){
    c++;
    d[b[i]]=1;
    }
    }
    cout<<n-c;
}


#include <iostream>
using namespace std;
int main()
{
    int n,c=0;
    std::cin>>n;
    int a[n],b[n],d[n]={0};
    for(int i=1;i<=n;i++){
    std::cin>>a[i]>>b[i];
    if((a[i]!=b[i])&&d[b[i]]==0){
    c++;
    d[b[i]]=1;
    }
    }
    cout<<n-c;
}


#include <bits/stdc++.h>
#define mp make_pair
#define X first
#define Y second
#define pii pair<ll,ll>
#define x1 dlfjl
#define x2 dkfj
#define x3 dflgkg
#define y1 dskgj
#define y2 dskfj
#define y3 dfhgdh
#define SQ 320
#define PI 3.14159265359
#define MOD 998244353
#define ROW 5
#define COL 30000
typedef int ll;
using namespace std;
ll n,i,j,k,z,m,q,h,r,timer,mx,l, cnt, u,v,tot,x,y,INF, ans;
ll a[300005], res[305000], b[300500], tin[305000], fup[300500], used[300500], col[300500], w[300500];
vector<ll> g[300500], tree[300500], gr[300500];
map<pii, ll> is_bridge;
vector<pii> bridges;
void dfs (int v, int p = -1) {
	used[v] = 1;
	tin[v] = fup[v] = timer++;
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (to == p)  continue;
		if (used[to])
			fup[v] = min (fup[v], tin[to]);
		else {
			dfs (to, v);
			fup[v] = min (fup[v], fup[to]);
			if (fup[to] > tin[v]) {
                is_bridge[mp(v,to)] = is_bridge[mp(to, v)] = 1;
                bridges.push_back(mp(v,to));
			}
		}
	}
}

void dfs2(int v) {
    if (used[v])
        return;
    col[v] = tot;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        ll to = g[v][i];
        if (is_bridge.find(mp(v, to)) == is_bridge.end())
            dfs2(to);
    }
}

void find_bridges() {
	timer = 0;
	for (int i=1; i <= n; ++i)
		if (!used[i])
			dfs (i);
}

ll dfs_tree(ll v, ll p = -1) {
    ll max1 = -1;
    ll max2 = -1;
    for (int i = 0; i < tree[v].size(); i++) {
        ll to = tree[v][i];
        if (to != p) {
            ll val = dfs_tree(to, v);
            if (val > max1) {
                max2 = max1;
                max1 = val;
            } else if (val > max2) {
                max2 = val;
            }
        }
    }
    //cout << v << " " << max1 << " " << max2 << endl;
    w[v] = max1 + max2 + 2;
    return max1 + 1;
}

int main() {

    //freopen("input.txt","r",stdin);
    cin >> n;
    ll ans = 0;
    for (int i = 0; i < n; i++) {
        cin >> x >> y;
        if (y != x && y <= n)
            a[x] = 1;
    }
    for (int i = 0; i < 2000; i++)
        ans += a[i];
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define X first
#define Y second
#define pii pair<ll,ll>
#define x1 dlfjl
#define x2 dkfj
#define x3 dflgkg
#define y1 dskgj
#define y2 dskfj
#define y3 dfhgdh
#define SQ 320
#define PI 3.14159265359
#define MOD 998244353
#define ROW 5
#define COL 30000
typedef int ll;
using namespace std;
ll n,i,j,k,z,m,q,h,r,timer,mx,l, cnt, u,v,tot,x,y,INF, ans;
ll a[300005], res[305000], b[300500], tin[305000], fup[300500], used[300500], col[300500], w[300500];
vector<ll> g[300500], tree[300500], gr[300500];
map<pii, ll> is_bridge;
vector<pii> bridges;
void dfs (int v, int p = -1) {
	used[v] = 1;
	tin[v] = fup[v] = timer++;
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (to == p)  continue;
		if (used[to])
			fup[v] = min (fup[v], tin[to]);
		else {
			dfs (to, v);
			fup[v] = min (fup[v], fup[to]);
			if (fup[to] > tin[v]) {
                is_bridge[mp(v,to)] = is_bridge[mp(to, v)] = 1;
                bridges.push_back(mp(v,to));
			}
		}
	}
}

void dfs2(int v) {
    if (used[v])
        return;
    col[v] = tot;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        ll to = g[v][i];
        if (is_bridge.find(mp(v, to)) == is_bridge.end())
            dfs2(to);
    }
}

void find_bridges() {
	timer = 0;
	for (int i=1; i <= n; ++i)
		if (!used[i])
			dfs (i);
}

ll dfs_tree(ll v, ll p = -1) {
    ll max1 = -1;
    ll max2 = -1;
    for (int i = 0; i < tree[v].size(); i++) {
        ll to = tree[v][i];
        if (to != p) {
            ll val = dfs_tree(to, v);
            if (val > max1) {
                max2 = max1;
                max1 = val;
            } else if (val > max2) {
                max2 = val;
            }
        }
    }
    //cout << v << " " << max1 << " " << max2 << endl;
    w[v] = max1 + max2 + 2;
    return max1 + 1;
}

int main() {

    //freopen("input.txt","r",stdin);
    cin >> n;
    ll ans = 0;
    for (int i = 0; i < n; i++) {
        cin >> x >> y;
        if (y == x || y > n)
            ans++;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define X first
#define Y second
#define pii pair<ll,ll>
#define x1 dlfjl
#define x2 dkfj
#define x3 dflgkg
#define y1 dskgj
#define y2 dskfj
#define y3 dfhgdh
#define SQ 320
#define PI 3.14159265359
#define MOD 998244353
#define ROW 5
#define COL 30000
typedef int ll;
using namespace std;
ll n,i,j,k,z,m,q,h,r,timer,mx,l, cnt, u,v,tot,x,y,INF, ans;
ll a[300005], res[305000], b[300500], tin[305000], fup[300500], used[300500], col[300500], w[300500];
vector<ll> g[300500], tree[300500], gr[300500];
map<pii, ll> is_bridge;
vector<pii> bridges;
void dfs (int v, int p = -1) {
	used[v] = 1;
	tin[v] = fup[v] = timer++;
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (to == p)  continue;
		if (used[to])
			fup[v] = min (fup[v], tin[to]);
		else {
			dfs (to, v);
			fup[v] = min (fup[v], fup[to]);
			if (fup[to] > tin[v]) {
                is_bridge[mp(v,to)] = is_bridge[mp(to, v)] = 1;
                bridges.push_back(mp(v,to));
			}
		}
	}
}

void dfs2(int v) {
    if (used[v])
        return;
    col[v] = tot;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        ll to = g[v][i];
        if (is_bridge.find(mp(v, to)) == is_bridge.end())
            dfs2(to);
    }
}

void find_bridges() {
	timer = 0;
	for (int i=1; i <= n; ++i)
		if (!used[i])
			dfs (i);
}

ll dfs_tree(ll v, ll p = -1) {
    ll max1 = -1;
    ll max2 = -1;
    for (int i = 0; i < tree[v].size(); i++) {
        ll to = tree[v][i];
        if (to != p) {
            ll val = dfs_tree(to, v);
            if (val > max1) {
                max2 = max1;
                max1 = val;
            } else if (val > max2) {
                max2 = val;
            }
        }
    }
    //cout << v << " " << max1 << " " << max2 << endl;
    w[v] = max1 + max2 + 2;
    return max1 + 1;
}

int main() {

    //freopen("input.txt","r",stdin);
    cin >> n;
    ll ans = 0;
    for (int i = 0; i < n; i++) {
        cin >> x >> y;
        if (y != x && y <= n)
            a[x] = 1;
    }
    for (int i = 0; i < 2000; i++)
        ans += a[i];
    cout << n-ans << endl;
    return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define X first
#define Y second
#define pii pair<ll,ll>
#define x1 dlfjl
#define x2 dkfj
#define x3 dflgkg
#define y1 dskgj
#define y2 dskfj
#define y3 dfhgdh
#define SQ 320
#define PI 3.14159265359
#define MOD 998244353
#define ROW 5
#define COL 30000
typedef int ll;
using namespace std;
ll n,i,j,k,z,m,q,h,r,timer,mx,l, cnt, u,v,tot,x,y,INF, ans;
ll a[300005], res[305000], b[300500], tin[305000], fup[300500], used[300500], col[300500], w[300500];
vector<ll> g[300500], tree[300500], gr[300500];
map<pii, ll> is_bridge;
vector<pii> bridges;
void dfs (int v, int p = -1) {
	used[v] = 1;
	tin[v] = fup[v] = timer++;
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (to == p)  continue;
		if (used[to])
			fup[v] = min (fup[v], tin[to]);
		else {
			dfs (to, v);
			fup[v] = min (fup[v], fup[to]);
			if (fup[to] > tin[v]) {
                is_bridge[mp(v,to)] = is_bridge[mp(to, v)] = 1;
                bridges.push_back(mp(v,to));
			}
		}
	}
}

void dfs2(int v) {
    if (used[v])
        return;
    col[v] = tot;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        ll to = g[v][i];
        if (is_bridge.find(mp(v, to)) == is_bridge.end())
            dfs2(to);
    }
}

void find_bridges() {
	timer = 0;
	for (int i=1; i <= n; ++i)
		if (!used[i])
			dfs (i);
}

ll dfs_tree(ll v, ll p = -1) {
    ll max1 = -1;
    ll max2 = -1;
    for (int i = 0; i < tree[v].size(); i++) {
        ll to = tree[v][i];
        if (to != p) {
            ll val = dfs_tree(to, v);
            if (val > max1) {
                max2 = max1;
                max1 = val;
            } else if (val > max2) {
                max2 = val;
            }
        }
    }
    //cout << v << " " << max1 << " " << max2 << endl;
    w[v] = max1 + max2 + 2;
    return max1 + 1;
}

int main() {

    //freopen("input.txt","r",stdin);
    cin >> n;
    ll ans = n;
    for (int i = 0; i < n; i++) {
        cin >> a[i] >> b[i];
    }
    for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++)
    if (i != j && a[j] == b[i]) {
        ans--;
        break;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define X first
#define Y second
#define pii pair<ll,ll>
#define x1 dlfjl
#define x2 dkfj
#define x3 dflgkg
#define y1 dskgj
#define y2 dskfj
#define y3 dfhgdh
#define SQ 320
#define PI 3.14159265359
#define MOD 998244353
#define ROW 5
#define COL 30000
typedef int ll;
using namespace std;
ll n,i,j,k,z,m,q,h,r,timer,mx,l, cnt, u,v,tot,x,y,INF, ans;
ll a[300005], res[305000], b[300500], tin[305000], fup[300500], used[300500], col[300500], w[300500];
vector<ll> g[300500], tree[300500], gr[300500];
map<pii, ll> is_bridge;
vector<pii> bridges;
void dfs (int v, int p = -1) {
	used[v] = 1;
	tin[v] = fup[v] = timer++;
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (to == p)  continue;
		if (used[to])
			fup[v] = min (fup[v], tin[to]);
		else {
			dfs (to, v);
			fup[v] = min (fup[v], fup[to]);
			if (fup[to] > tin[v]) {
                is_bridge[mp(v,to)] = is_bridge[mp(to, v)] = 1;
                bridges.push_back(mp(v,to));
			}
		}
	}
}

void dfs2(int v) {
    if (used[v])
        return;
    col[v] = tot;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        ll to = g[v][i];
        if (is_bridge.find(mp(v, to)) == is_bridge.end())
            dfs2(to);
    }
}

void find_bridges() {
	timer = 0;
	for (int i=1; i <= n; ++i)
		if (!used[i])
			dfs (i);
}

ll dfs_tree(ll v, ll p = -1) {
    ll max1 = -1;
    ll max2 = -1;
    for (int i = 0; i < tree[v].size(); i++) {
        ll to = tree[v][i];
        if (to != p) {
            ll val = dfs_tree(to, v);
            if (val > max1) {
                max2 = max1;
                max1 = val;
            } else if (val > max2) {
                max2 = val;
            }
        }
    }
    //cout << v << " " << max1 << " " << max2 << endl;
    w[v] = max1 + max2 + 2;
    return max1 + 1;
}

int main() {

    //freopen("input.txt","r",stdin);
    cin >> n;
    ll ans = n;
    for (int i = 0; i < n; i++) {
        cin >> a[i] >> b[i];
    }
    for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++)
    if (i != j && b[j] == a[i]) {
        ans--;
        break;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define X first
#define Y second
#define pii pair<ll,ll>
#define x1 dlfjl
#define x2 dkfj
#define x3 dflgkg
#define y1 dskgj
#define y2 dskfj
#define y3 dfhgdh
#define SQ 320
#define PI 3.14159265359
#define MOD 998244353
#define ROW 5
#define COL 30000
typedef int ll;
using namespace std;
ll n,i,j,k,z,m,q,h,r,timer,mx,l, cnt, u,v,tot,x,y,INF, ans;
ll a[300005], res[305000], b[300500], tin[305000], fup[300500], used[300500], col[300500], w[300500];
vector<ll> g[300500], tree[300500], gr[300500];
map<pii, ll> is_bridge;
vector<pii> bridges;
void dfs (int v, int p = -1) {
	used[v] = 1;
	tin[v] = fup[v] = timer++;
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (to == p)  continue;
		if (used[to])
			fup[v] = min (fup[v], tin[to]);
		else {
			dfs (to, v);
			fup[v] = min (fup[v], fup[to]);
			if (fup[to] > tin[v]) {
                is_bridge[mp(v,to)] = is_bridge[mp(to, v)] = 1;
                bridges.push_back(mp(v,to));
			}
		}
	}
}

void dfs2(int v) {
    if (used[v])
        return;
    col[v] = tot;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        ll to = g[v][i];
        if (is_bridge.find(mp(v, to)) == is_bridge.end())
            dfs2(to);
    }
}

void find_bridges() {
	timer = 0;
	for (int i=1; i <= n; ++i)
		if (!used[i])
			dfs (i);
}

ll dfs_tree(ll v, ll p = -1) {
    ll max1 = -1;
    ll max2 = -1;
    for (int i = 0; i < tree[v].size(); i++) {
        ll to = tree[v][i];
        if (to != p) {
            ll val = dfs_tree(to, v);
            if (val > max1) {
                max2 = max1;
                max1 = val;
            } else if (val > max2) {
                max2 = val;
            }
        }
    }
    //cout << v << " " << max1 << " " << max2 << endl;
    w[v] = max1 + max2 + 2;
    return max1 + 1;
}

int main() {

    //freopen("input.txt","r",stdin);
    cin >> n;
    ll ans = 0;
    for (int i = 0; i < n; i++) {
        cin >> x >> y;
        b[x]++;
        if (y != x && y <= n)
            a[x] = 1;
    }
    for (int i = 0; i < 2000; i++)
        ans += a[i] * b[i];
    cout << n-ans << endl;
    return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define X first
#define Y second
#define pii pair<ll,ll>
#define x1 dlfjl
#define x2 dkfj
#define x3 dflgkg
#define y1 dskgj
#define y2 dskfj
#define y3 dfhgdh
#define SQ 320
#define PI 3.14159265359
#define MOD 998244353
#define ROW 5
#define COL 30000
typedef int ll;
using namespace std;
ll n,i,j,k,z,m,q,h,r,timer,mx,l, cnt, u,v,tot,x,y,INF, ans;
ll a[300005], res[305000], b[300500], tin[305000], fup[300500], used[300500], col[300500], w[300500];
vector<ll> g[300500], tree[300500], gr[300500];
map<pii, ll> is_bridge;
vector<pii> bridges;
void dfs (int v, int p = -1) {
	used[v] = 1;
	tin[v] = fup[v] = timer++;
	for (size_t i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (to == p)  continue;
		if (used[to])
			fup[v] = min (fup[v], tin[to]);
		else {
			dfs (to, v);
			fup[v] = min (fup[v], fup[to]);
			if (fup[to] > tin[v]) {
                is_bridge[mp(v,to)] = is_bridge[mp(to, v)] = 1;
                bridges.push_back(mp(v,to));
			}
		}
	}
}

void dfs2(int v) {
    if (used[v])
        return;
    col[v] = tot;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++) {
        ll to = g[v][i];
        if (is_bridge.find(mp(v, to)) == is_bridge.end())
            dfs2(to);
    }
}

void find_bridges() {
	timer = 0;
	for (int i=1; i <= n; ++i)
		if (!used[i])
			dfs (i);
}

ll dfs_tree(ll v, ll p = -1) {
    ll max1 = -1;
    ll max2 = -1;
    for (int i = 0; i < tree[v].size(); i++) {
        ll to = tree[v][i];
        if (to != p) {
            ll val = dfs_tree(to, v);
            if (val > max1) {
                max2 = max1;
                max1 = val;
            } else if (val > max2) {
                max2 = val;
            }
        }
    }
    //cout << v << " " << max1 << " " << max2 << endl;
    w[v] = max1 + max2 + 2;
    return max1 + 1;
}

int main() {

    //freopen("input.txt","r",stdin);
    cin >> n;
    ll ans = n;
    for (int i = 0; i < n; i++) {
        cin >> a[i] >> b[i];
    }
    for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++)
    if (i != j && a[j] == b[i]) {
        ans--;
        break;
    }
    return 0;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j=0,a[n][2];
    while(i<n){
        cin>>a[i][0]>>a[i][1];
        i++;
    }

    i=0;
    while(i<n){
        j=0;
        while(j<n){
            if(a[i][0]==a[j][1]&&i!=j){
                count++;
                break;
            }
            j++;
        }
        i++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].second>>a[i].first;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    i=0;
    while(i<n-1){
        if(a[i].first==a[i+1].first){
            a[i].first==0;
        }
        i++;
    }
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].first==a[i].second&&i!=j){
                count++;
            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].second>>a[i].first;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    i=0;
    while(i<n-1){
        if(a[i].first==a[i+1].first){
            a[i].first=0;
        }
        i++;
    }
    sort(a,a+n);
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].first==a[i].second&&i!=j){
                count++;
            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].first>>a[i].second;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].second==a[i].first){
                count++;
                if(tmp==a[i].first){
                    count--;
                }
                tmp=a[i].first;
                j=j+1;
                i=0;

            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].first>>a[i].second;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].second==a[i].first&&i!=j){
                count++;
                if(tmp==a[i].first){
                    count--;
                }
                tmp=a[i].first;
                j=j+1;
                i=0;

            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].second>>a[i].first;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    i=0;
    while(i<n-1){
        if(a[i].first==a[i+1].first){
            a[i].first==0;
        }
        i++;
    }
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].first==a[i].second&&i!=j){
                count++;
                j++;
                i=0;

            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].first>>a[i].second;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].second==a[i].first&&i!=j){
                count++;
                if(tmp==a[i].first){
                    count--;
                }
                tmp=a[i].first;
            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].second>>a[i].first;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].first==a[i].second&&i!=j&&a[j].first!=tmp){
                count++;
                tmp=a[j].first;
            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].second>>a[i].first;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    i=0;
    while(i<n-1){
        if(a[i].first==a[i+1].first){
            a[i].first==0;
        }
        i++;
    }
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].first==a[i].second&&i!=j){
                count++;
                cout<<j<<i;
            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


using namespace std;
#include <bits/stdc++.h>

int main(){
    long long int n,count=0,tmp=0;
    cin>>n;
    int i=0,j;
    pair <int,int> a[n];
    while(i<n){
        cin>>a[i].first>>a[i].second;
        i++;
    }
    i=0,j=0;
    sort(a,a+n);
    while(j<n){
        i=0;
        while(i<n){
            if(a[j].second==a[i].first){
                count++;
                if(tmp==a[i].first){
                    count--;
                }
                tmp=a[i].first;
                j=j+1;
                i=0;

            }
            i++;
        }
        j++;
    }
    cout<<n-count;
}


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

int main()
{

        ll n, i, j = 0, m = 0, cou = 0, sum = 0, r, f = 0;

        ll mx = 0, mn = INT_MAX, lz=0, rz=0, lo=0, ro=INT_MAX, mi = 0;
        ll mid, k, d;
        ll x, y;
        cin >> n;
        vector<int> v1(n), v2(n);
        set<int> s, t;
        for(i = 0; i < n; i++)
        {
                cin >> v1[i] >> v2[i];
                s.insert(v1[i]);

        }
        for(i = 0; i < n; i++)
        {
                if(s.count(v2[i]) && v2[i] != v1[i])
                        cou++;
        }
        cout << n - cou;

}


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

int main()
{

        ll n, i, j = 0, m = 0, cou = 0, sum = 0, f = 0;

        ll mx = INT_MIN, mn = INT_MAX, lz=0, rz=0, lo=0, ro=INT_MAX, mi = 0;
        ll mid, k, d, l, r;
        ll x, y, z = 0, merged = 0, add = 0;
        cin >> n;
        set<int> canbeopened;
        map<int, int> tobeopened;
        for(i = 0; i < n; i++)
        {
                int a, b;
                cin >> a >> b;
                if(a != b)
                {
                        canbeopened.insert(b);
                        if(tobeopened.find(a) != tobeopened.end())
                        {
                                tobeopened[a]++;
                        }
                        else
                                tobeopened[a] = 1;
                }
        }
        for(auto it = canbeopened.begin(); it != canbeopened.end(); it++)
        {
                if(tobeopened.find(*it) != tobeopened.end())
                        cou += tobeopened[*it];
        }
        cout << n-cou;

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
typedef pair<int, int> pi;

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int i, n, k, j, wt, m, knows_zero = 0, a, b, c, t, sum = 0, val = 0, cnt = 0;

	cin >> n ;
	vector<pi> v;
	for(i = 0; i < n; i++)
	{
		cin >> a >> b;
		v.push_back({a, b});
	}
	for(i = 0; i < n; i++)
	{
		int to_open = v[i].first, opened = 0;
		for(j = 0; j < n; j++)
		{
			if(i == j)
				continue;
			if(v[j].second == to_open)
				opened = 1;
		}
		if(!opened)
			cnt++;
	}
	cout << cnt;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{

        int i=0,d, m,ma= 0,ind=0,cou = 0,j,sum=0,k, maxx= INT_MIN, flag =0;//,min=1e9 + 1,mr, f=0;
        int x,y,n;
        cin >> n ;
        vector<int> b(n), co(n), op(n,0);

        for(i = 0; i < n; i++)
        {
                cin >> b[i] >> co[i] ;

        }
        for(i= 0 ;i < n; i++)
        {
                for(j = 0; j < n; j++)
                {
                        if(b[i]==co[j] && i!=j)
                        {
                                op[i] = 1;
                        }
                }
        }
        for(i = 0; i < n; i++)
        {
                if(op[i]!=0)
                        cou++;
        }
        cout << n- cou;

}


#include <cstdio>
using namespace std;

int sum[5005];

int main()
{
    int a,n,k;
    scanf("%d%d",&n,&k);
    for (int i=1;i<=n;i++)
    {
        scanf("%d",&a);
        sum[i]=sum[i-1]+a;
    }
    double ans=-1.0,now;
    for (int i=k;i<=n;i++)
    {
        for (int j=k;j<=n;j++)
        {
            now=(sum[j]-sum[j-k])*1.0/k;
            if(now>ans)ans=now;
        }
    }
    printf("%lf\n",ans);
    return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int sum[5005];

int main()
{
    int a,n,k;
    scanf("%d%d",&n,&k);
    for (int i=1;i<=n;i++)
    {
        scanf("%d",&a);
        sum[i]=sum[i-1]+a;
    }
    double ans=-1.0,now;
    for (int i=k;i<=n;i++)
    {
        for (int j=i;j<=n;j++)
        {
            long double x=(long double)(sum[j]-sum[j-k]);
            now=x/k;
            if(now>ans)ans=now;
        }
    }
    printf("%Lf\n",ans);
    return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int sum[5005];

int main()
{
    int a,n,k;
    scanf("%d%d",&n,&k);
    for (int i=1;i<=n;i++)
    {
        scanf("%d",&a);
        sum[i]=sum[i-1]+a;
    }
    double ans=-1.0,now;
    for (int i=k;i<=n;i++)
    {
        for (int j=i;j<=n;j++)
        {
            long double x=(long double)(sum[j]-sum[j-i]);
            now=x/k;
            if(now>ans)ans=now;
        }
    }
    printf("%Lf\n",ans);
    return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int sum[5005];

int main()
{
    int a,n,k;
    scanf("%d%d",&n,&k);
    for (int i=1;i<=n;i++)
    {
        scanf("%d",&a);
        sum[i]=sum[i-1]+a;
    }
    double ans=-1.0,now;
    for (int i=k;i<=n;i++)
    {
        for (int j=k;j<=n;j++)
        {
            long double x=(long double)(sum[j]-sum[j-k]);
            now=x/k;
            if(now>ans)ans=now;
        }
    }
    printf("%Lf\n",ans);
    printf("%llf\n",ans);
    cout<<ans<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<map>
using namespace std;

typedef unsigned long long ll;
typedef short int sh;

const int inf=0x3f3f3f3f;
const int MAX=5e3+10;
const int mod=1e9+7;
const int dir[8][2]={{1,0},{-1,0},{0,1},{0,-1},{1,1},{1,-1},{-1,-1},{-1,1}};

int sum[MAX];

int main()
{
    int n,k;
    while(scanf("%d%d",&n,&k)!=EOF)
    {
        memset(sum,0,sizeof(sum));
        for(int i=1;i<=n;i++)
        {
            int x;
            scanf("%d",&x);
            sum[i]=sum[i-1]+x;
        }
        double ans=-inf;
        for(int d=k;d<=n;d++)
        {
            for(int j=d;j<=n;j++)
            {
                int i=j-d;
                ans=max(ans,(double)(sum[j]-sum[i])/d);
            }
        }
        printf("%.15lf\n",ans);
    }
    return 0;
}


#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n, m; cin >> n >> m;
	vector<double> Heat;
	for (int i=0;i<n;i++){
		double a; cin >> a;
		Heat.push_back(a);
	}
	double sum=0;
	for (int i=0;i<m;i++) {
		sum += Heat[i];
	}
	double ans = sum;
	for (int i=0;i<n-m;i++) {
		sum -= Heat[i];
		sum += Heat[i + m];
		ans = max(ans, sum);
	}
	cout.precision(10);
	cout << ans/3<<endl;
}


#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n, m; cin >> n >> m;
	vector<double> Heat;
	for (int i=0;i<n;i++){
		double a; cin >> a;
		Heat.push_back(a);
	}
	double sum=0;
	for (int i=0;i<m;i++) {
		sum += Heat[i];
	}
	double ans = sum;
	for (int i=0;i<n-m;i++) {
		sum -= Heat[i];
		sum += Heat[i + m];
		ans = max(ans, sum);
	}
	cout.precision(100);
	cout << ans/m<<endl;
}


#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n, m; cin >> n >> m;
	vector<double> Heat;
	for (int i=0;i<n;i++){
		double a; cin >> a;
		Heat.push_back(a);
	}
	double sum=0;
	for (int i=0;i<m;i++) {
		sum += Heat[i];
	}
	double ans = sum;
	for (int i=0;i<n-m;i++) {
		sum -= Heat[i];
		sum += Heat[i + m];
		ans = max(ans, sum);
	}
	cout.precision(10);
	cout << ans/m<<endl;
}


#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n, m; cin >> n >> m;
	vector<double> Heat;
	Heat.push_back(0);
	for (int i=0;i<n;i++){
		double a; cin >> a;
		Heat.push_back(a+Heat[i]);
	}
	double ans=0;
	for (int i=0;i<=n-m;i++) {
		for (int j = m;j+i<=n; j++) {
			ans = max(ans, (Heat[i+j]-Heat[i])/j);
		}
	}
	cout.precision(20);
	cout << ans<<endl;
}


//인텐스 히트
//온도와 날씨변화
//여름 매우 더울거임. 얼마나 더울지 예상할거임.
//인텐시티 값을 계싼할거임.
//n은 날짜 수, i번째 날의 온도는 a[i]임
//x~y날짜의 평균 기온은 sum / (y-x+1)임.
//결과는 더블을 써야한다. 프리픽스 썸 결과는 더블이어야한다.
//평균 기온의 맥스?

#include <stdio.h>

int a[5005];
int p[5005];

int main() {
	int n, k;
	int i, j;
	double avg[5005], ans;

	scanf_s("%d %d", &n, &k);
	//printf("%d%d\n", n, k);

	for (i = 0; i < n; i++) {
		scanf_s("%d", &a[i]);
	}

	p[0] = 0;
	for (i = 1; i <= n; i++) {
		p[i] = p[i - 1] + a[i-1];
	}//프리픽스썸 계산

	j = 0;
	ans = 0;
	while (k <= n) {
		for (i = 0; i < n - k + 1; i++) {
			avg[i+j] = ((double)p[i + k] - p[i]) / (double)k;
			if (ans < avg[i + j]) ans = avg[i + j];
		}//애버리지 계산
		j = n - k + 1;
		k++;
	}

	printf("%lf", ans);

	return 0;
}


//인텐스 히트
//온도와 날씨변화
//여름 매우 더울거임. 얼마나 더울지 예상할거임.
//인텐시티 값을 계싼할거임.
//n은 날짜 수, i번째 날의 온도는 a[i]임
//x~y날짜의 평균 기온은 sum / (y-x+1)임.
//결과는 더블을 써야한다. 프리픽스 썸 결과는 더블이어야한다.
//평균 기온의 맥스?

#include <stdio.h>

int a[5005];
int p[5005];

int main() {
	int n, k;
	int i, j;
	double avg[5005], ans;

	scanf_s("%d %d", &n, &k);
	//printf("%d%d\n", n, k);

	for (i = 0; i < n; i++) {
		scanf_s("%d", &a[i]);
	}

	p[0] = 0;
	for (i = 1; i <= n; i++) {
		p[i] = p[i - 1] + a[i-1];
	}//프리픽스썸 계산

	for (i = 0; i < n -k+1; i++) {
		avg[i] =((double) p[i+k] - p[i]) / (double) k;
	}//애버리지 계산

	ans = avg[0];
	for (i = 0; i < n - k + 1; i++) {
		if (avg[i] < avg[i + 1]) ans = avg[i + 1];
	}

	printf("%.10lf\n", ans);
	return 0;
}


//인텐스 히트
//온도와 날씨변화
//여름 매우 더울거임. 얼마나 더울지 예상할거임.
//인텐시티 값을 계싼할거임.
//n은 날짜 수, i번째 날의 온도는 a[i]임
//x~y날짜의 평균 기온은 sum / (y-x+1)임.
//결과는 더블을 써야한다. 프리픽스 썸 결과는 더블이어야한다.
//평균 기온의 맥스?

#include <stdio.h>

int a[5005];
int p[5005];

int main() {
	int n, k;
	int i, j;
	double avg[5005], ans;

	scanf_s("%d %d", &n, &k);
	//printf("%d%d\n", n, k);

	for (i = 0; i < n; i++) {
		scanf_s("%d", &a[i]);
	}

	p[0] = 0;
	for (i = 1; i <= n; i++) {
		p[i] = p[i - 1] + a[i-1];
	}//프리픽스썸 계산

	for (i = 0; i < n -k+1; i++) {
		avg[i] =((double) p[i+k] - p[i]) / (double) k;

	}//애버리지 계산

	ans = avg[0];
	for (i = 0; i < n - k + 1; i++) {
		if (avg[i] < avg[i + 1]) ans = avg[i + 1];
	}

	printf("%lf", ans);
	return 0;
}


//인텐스 히트
//온도와 날씨변화
//여름 매우 더울거임. 얼마나 더울지 예상할거임.
//인텐시티 값을 계싼할거임.
//n은 날짜 수, i번째 날의 온도는 a[i]임
//x~y날짜의 평균 기온은 sum / (y-x+1)임.
//결과는 더블을 써야한다. 프리픽스 썸 결과는 더블이어야한다.
//평균 기온의 맥스?

#include <stdio.h>

int a[5005];
int p[5005];

int main() {
	int n, k;
	int i, j;
	double avg[5005], ans;

	scanf_s("%d %d", &n, &k);
	//printf("%d%d\n", n, k);

	for (i = 0; i < n; i++) {
		scanf_s("%d", &a[i]);
	}

	p[0] = 0;
	for (i = 1; i <= n; i++) {
		p[i] = p[i - 1] + a[i-1];
	}//프리픽스썸 계산

	for (i = 0; i < n -k+1; i++) {
		avg[i] =((double) p[i+k] - p[i]) / (double) k;

	}//애버리지 계산

	ans = avg[0];
	for (i = 0; i < 10; i++) {
		if (avg[i] < avg[i + 1]) ans = avg[i + 1];
	}

	printf("%lf", ans);
	return 0;
}


//인텐스 히트
//온도와 날씨변화
//여름 매우 더울거임. 얼마나 더울지 예상할거임.
//인텐시티 값을 계싼할거임.
//n은 날짜 수, i번째 날의 온도는 a[i]임
//x~y날짜의 평균 기온은 sum / (y-x+1)임.
//결과는 더블을 써야한다. 프리픽스 썸 결과는 더블이어야한다.
//평균 기온의 맥스?

#include <stdio.h>

int a[5005];
int p[5005];

int main() {
	int n, k;
	int i, j;
	double avg[5005], ans;

	scanf_s("%d %d", &n, &k);
	//printf("%d%d\n", n, k);

	for (i = 0; i < n; i++) {
		scanf_s("%d", &a[i]);
	}

	p[0] = 0;
	for (i = 1; i <= n; i++) {
		p[i] = p[i - 1] + a[i-1];
	}//프리픽스썸 계산

	for (i = 0; i < n -k+1; i++) {
		avg[i] =((double) p[i+k] - p[i]) / (double) k;
	}//애버리지 계산

	ans = avg[0];
	for (i = 0; i < n - k + 1; i++) {
		if (avg[i] < avg[i + 1]) ans = avg[i + 1];
	}

	printf("%lf\n", ans);
	return 0;
}


#include <stdio.h>

int main() {
	int n, k;
	double avg, max;
	int temp[5001];
	double p[5001];

	scanf("%d", &n);
	scanf("%d", &k);
	temp[0] = 0;

	for (int i = 1; i <= n; i++) {
		scanf("%d", &temp[i]);
	}

	p[0] = 0.0;
	for (int i = 1; i <= n; i++) {
		p[i] = temp[i] + p[i - 1];
	}

	max = 0;
	while (k <= n) {
		for (int i = n ; i >= k ; i--) {

			avg = (double)(p[i] - p[i - k])/k;

			if (max < avg) {
				max = avg;
			}

		}
		k+=1;
	}

	printf("%.15lf", max);

	return 0;
}


#include <stdio.h>

int main() {
	int n, k;
	double avg, max;
	int temp[5000];
	double p[5000];

	scanf("%d", &n);
	scanf("%d", &k);
	temp[0] = 0;

	for (int i = 1; i <= n; i++) {
		scanf("%d", &temp[i]);
	}

	p[0] = 0.0;
	for (int i = 1; i <= n; i++) {
		p[i] = temp[i] + p[i - 1];
	}

	max = 0;
	while (k <= n) {
		for (int i = n ; i >= k ; i--) {

			avg = (double)(p[i] - p[i - k])/k;

			if (max < avg) {
				max = avg;
			}

		}
		k+=1;
	}

	printf("%.15lf", max);

	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i <= n - k; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << setprecision(15) << ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u-i+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << setprecision(15) << ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << setprecision(15) << ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n - k; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout <<setprecision(15)<< ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	if (n == 1)
	{
		cout << a[0];
		return 0;
	}
	for (int i = 0; i < n - k; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << setprecision(15) << ans;
	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = 0; i < n - k; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
//	n += n == k;
	for (int i = 0; i < n - k+1; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << setprecision(15) << ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
//	n += n == k;
	for (int i = 0; i < n - k||n==k; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << setprecision(15) << ans;
	return 0;
}


#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;

int main()
{
	int n, k, a[5000], j = 0;
	double ans = 0;
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	n += n == k;
	for (int i = 0; i < n - k; i++)
	{
		j = 0;
		for (int u = i; u < n; u++)
		{
			j += a[u];
			if (u+1 >= k)
				ans = max(ans, j / double(u - i + 1));
		}
	}
	cout << setprecision(15) << ans;
	return 0;
}


#include<iostream>
long long arr[100005];
long long leftp[100005];
long long rightp[100005];
using namespace std;

int main(void) {
	int t, n;

	cin >> t;
	for (int i = 0; i < t; i++) {
		bool swit = true;
		cin >> n;
		for (int i = 1; i <= n; i++) {
			cin >> arr[i];
		}
		leftp[0] = 0;
		rightp[n + 1] = 0;
		for (int i = 1; i <= n; i++) {
			leftp[i] = leftp[i - 1] + arr[i];
		}
		for (int i = n; i >= 1; i--) {
			rightp[i] = rightp[i + 1] + arr[i];
		}
		for (int i = 1; i <= n; i++) {
			if (leftp[i] <= 0 || rightp[i] <= 0) {
				swit = false;
				cout << "NO" << endl;
				break;
			}
		}
		if (swit) {
			cout << "YES" << endl;
		}
	}
	return 0;
}


#include<iostream>
int arr[5005];
int p[5005];
using namespace std;

int main(void) {
	int n, k;
	double temp = 0, max = 0;
	cin >> n >> k;

	for (int i = 1; i <= n; i++) {
		cin >> arr[i];
	}
	p[0] = 0;
	for (int i = 1; i <= n; i++) {
		p[i] = p[i - 1] + arr[i];
	}
	for (int i = 0; i <= n - k; i++) {	//Ƚ��
		for (int j = k + i; j <= n; j++) {	//�˻� ����
			if (temp < (double)(p[j] - p[j - k - i]) / (k + i)) {
				temp = (double)(p[j] - p[j - k - i]) / (k + i);
			}
		}
		if (max < temp) {
			max = temp;
		}
	}
	cout.precision(15);
	cout << max;
	return 0;
}


#include<iostream>
int arr[5005];
int p[5005];
using namespace std;

int main(void) {
	int n, k;
	double temp = 0, max = 0;
	cin >> n >> k;

	for (int i = 1; i <= n; i++) {
		cin >> arr[i];
	}
	p[0] = 0;
	for (int i = 1; i <= n; i++) {
		p[i] = p[i - 1] + arr[i];
	}
	for (int i = 0; i <= n - k; i++) {	//Ƚ��
		for (int j = k; j <= n; j++) {	//�˻� ����
			if (temp < (double)(p[j] - p[j - k - i]) / j) {
				temp = (double)(p[j] - p[j - k - i]) / j;
			}
		}
		if (max < temp) {
			max = temp;
		}
	}
	cout.precision(15);
	cout << max;
	return 0;
}


#include<iostream>
int arr[5005];
int p[5005];
using namespace std;

int main(void) {
	int n, k;
	double max1 = 0, max2 = 0;
	cin >> n >> k;

	for (int i = 1; i <= n; i++) {
		cin >> arr[i];
	}
	p[0] = 0;
	for (int i = 1; i <= n; i++) {
		p[i] = p[i - 1] + arr[i];
	}
	for (int j = k; j <= n; j++) {
		for (int i = k; i <= n; i++) {
			if (max1 < (double)(p[i] - p[i - k]) / j) {
				max1 = (double)(p[i] - p[i - k]) / j;
			}
		}
		if (max1 > max2) {
			max2 = max1;
		}
	}
	cout.precision(15);
	cout << max2;
	return 0;
}


#include<iostream>
int arr[5005];
int p[5005];
using namespace std;

int main(void) {
	int n, k;
	double temp = 0, max = 0;
	cin >> n >> k;

	for (int i = 1; i <= n; i++) {
		cin >> arr[i];
	}
	p[0] = 0;
	for (int i = 1; i <= n; i++) {
		p[i] = p[i - 1] + arr[i];
	}
	for (int i = 0; i <= n - k; i++) {	//Ƚ��
		for (int j = k + i; j <= n; j++) {	//�˻� ����
			if (temp < (double)(p[j] - p[j - k - i]) / j) {
				temp = (double)(p[j] - p[j - k - i]) / j;
			}
		}
		if (max < temp) {
			max = temp;
		}
	}
	cout.precision(15);
	cout << max;
	return 0;
}


#include<iostream>
int arr[5005];
int p[5005];
int ans = 0;
long long sum1, sum2, sum3, sum, sum_d_3;
using namespace std;

int main(void) {
	int n, k;
	double max1 = 0, max2 = 0;
	cin >> n >> k;

	for (int i = 1; i < n; i++) {
		cin >> arr[i];
	}
	p[0] = 0;
	for (int i = 1; i <= n; i++) {
		p[i] = p[i - 1] + arr[i];
	}
	for (int j = k; j <= n; j++) {
		for (int i = k; i <= n; i++) {
			if (max1 < (double)(p[i] - p[i - k]) / j) {
				max1 = (double)(p[i] - p[i - k]) / j;
			}
		}
		if (max1 > max2) {
			max2 = max1;
		}
	}
	cout.precision(15);
	cout << max2;
	return 0;
}


#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

int a[5001];

int main()
{int i,j,n,k;
long long maxl=0,x=0;
double h;
scanf("%d %d",&n,&k);
for(i=0;i<n;i++){
    scanf("%d",&a[i]);
}
for(i=0;i<=n-k;i++){
    x=0;
   for(j=i;j<i+k;j++){
        x+=a[j];
   }
    if(x>maxl){
        maxl=x;
    }
}
h=(maxl*1.0)/(1.0*k);
printf("%.10lf\n",h);
    return 0;
}


#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

int a[5001];

int main()
{int i,j,n,k,maxl=0,x=0;
double h;
scanf("%d %d",&n,&k);
for(i=0;i<n;i++){
    scanf("%d",&a[i]);
}
for(i=0;i<=n-k;i++){
    x=0;
   for(j=i;j<i+k;j++){
        x+=a[j];
   }
    if(x>maxl){
        maxl=x;
    }
}
h=(double)maxl/(double)k;
printf("%.15lf\n",h);
    return 0;
}


#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

int a[5001];

int main()
{int i,j,y,n,k;
long long maxl=0,x=0;
double h,maxh=0;
scanf("%d %d",&n,&k);
for(i=0;i<n;i++){
    scanf("%d",&a[i]);
}
for(;k<=n;k++){
    maxl=0;
for(i=0;i<=n-k;i++){
    x=0;
   for(j=i;j<i+k;j++){
        x+=a[j];
   }
    if(x>maxl){
        maxl=x;
    }
}
h=(maxl*1.0)/(1.0*k);
if(h>maxh)maxh=h;
}
printf("%.10lf\n",maxh);
    return 0;

}


#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

int a[5001],sum[5001];

int main()
{int i,n,k;
long long maxl=0,x=0;
double h,maxh=0;
scanf("%d %d",&n,&k);
for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    if(i==0)sum[i]=a[i];
    else sum[i]=a[i]+sum[i-1];
}
for(;k<=n;k++){
    maxl=0;
for(i=k-1;i<n;i++){
    if(i==k-1)x=sum[i];
    else x=sum[i]-sum[i-k] ;
    if(x>maxl){
        maxl=x;
    }
}
h=(maxl*1.0)/(1.0*k);
if(h>maxh)maxh=h;
}
printf("%.10lf\n",maxh);
    return 0;

}


#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

int a[5001];

int main()
{int i,j,n,k;
long long maxl=0,x=0;
double h;
scanf("%d %d",&n,&k);
for(i=0;i<n;i++){
    scanf("%d",&a[i]);
}
for(i=0;i<=n-k;i++){
    x=0;
   for(j=i;j<i+k;j++){
        x+=a[j];
   }
    if(x>maxl){
        maxl=x;
    }
}
h=(double)maxl/(double)k;
printf("%.15lf\n",h);
    return 0;
}


#include<iostream>
#include<algorithm>

using namespace std;

int main() {

	int n;
	int k;

	double result=0;

	cin >> n;
	cin >> k;

	int *a = new int[n+1];
	int *prefix = new int[n + 1];
	prefix[0] = 0;

	for (int i = 1; i <= n; i++) {

		int temp;
		cin >> temp;
		a[i] = temp;
		prefix[i] = prefix[i - 1] + a[i];

	}

	for (int i = 1; i <= n-k+1; i++) {
		for (int j = i + k-1; j <= n; j++) {
			double temp=(prefix[j] - prefix[i-1]) / ((double)(j-i+1));
			result = max(temp, result);
		}
	}

	printf("%.15f", result);

}


#include<iostream>
using namespace std;
int a[5005];
int p[5005];
double ans;
int main() {
	int i,j,n, k;
	cin >> n >> k;
	p[0] = 0;
	for (i = 1; i <= n; i++) {
		cin >> a[i];
		p[i] = p[i - 1] + a[i];
	}

	double max = 0;
	for (j = k; j <= n; j++) {
		for (i = j; i <= n; i++) {
			double tmp = (double)(p[i] - p[i - j]) / (double)j;
			if (tmp > max) {
				max = tmp;
			}
		}
	}
	cout.fixed;
	cout.precision(12);
	cout << max;

}


#include <stdio.h>
int table[5010] = {0,};
void main(){
    int n,m;
    scanf("%d %d",&n,&m);
    for(int i=1;i<=n;i++){
        scanf("%d",&table[i]);
        table[i]+=table[i-1];
    }
    double max=-1;
    for(int i=0;i<=n-m+1;i++){
        for(int j=i+m;j<=n;j++){
            if(max < (table[j]-table[i])/(j-i)) max = (double)(table[j]-table[i])/(double)(j-i);
        }
    }
    printf("%.15f", max);
}


#include <stdio.h>
int table[5010] = {0,};
void main(){
    int n,m;
    scanf("%d %d",&n,&m);
    for(int i=1;i<=n;i++){
        scanf("%d",&table[i]);
        table[i]+=table[i-1];
    }
    long double max=-1;
    for(int i=0;i<=n-m+1;i++){
        for(int j=m;j<=n;j++){
            if(max < (table[j]-table[i])/(j-i)) max = (double)(table[j]-table[i])/(double)(j-i);
        }
    }
    printf("%.15f", max);
}


#include <stdio.h>
int table[5010] = {0,};
void main(){
    int n,m;
    scanf("%d %d",&n,&m);
    for(int i=1;i<=n;i++){
        scanf("%d",&table[i]);
        table[i]+=table[i-1];
    }
    double max=-1;
    for(int i=0;i<=n-m;i++){
        for(int j=i+m;j<=n;j++){
            if(max < (double)(table[j]-table[i])/(double)(j-i)) max = (double)(table[j]-table[i])/(double)(j-i);
        }
    }
    printf("%.15f", max);
}


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,K,k,i,j,d;

    while(~scanf("%d%d",&n,&k))
    {
        int a[5678];
        double num=0,ma=0;
        for(i=0;i<n;i++)
            scanf("%d",&a[i]);
        K=k;
        while(K!=n+1)
        {
            for(i=0;i<n;i++)
            {
                if(i+K<=n)
                {
                    for(j=i,num=0;j<i+K;j++)
                    {
                        num+=a[j];
                    }
                    num/=K*1.0;
                    if(ma<num)
                        ma=num;
                }
            }
            K++;
        }
        printf("%.17lf\n",ma);
    }

    return 0;
}


#include <iostream>

#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main()
{
    int n,K,k,i,j,d;

    while(~scanf("%d%d",&n,&k))
    {
        int a[5678];
        a[0]=0;

        double num=0,maxl=0;

        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            a[i]+=a[i-1];
        }
        for(i=k;i<=n;i++)
        {
            for(j=i;j<=n;j++)
            {
                maxl=max(maxl,(a[j]-a[j-i])*1.0/i);
            }
        }
        printf("%.15lf\n",maxl);
    }

    return 0;
}


#include <iostream>

#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main()
{
    int n,K,k,i,j,d;

    while(~scanf("%d%d",&n,&k))
    {
        int a[5678];
        a[0]=0;

        double num=0,maxl=0;

        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            a[i]+=a[i-1];
        }
        for(i=k;i<=n;i++)
        {
            for(j=i;j<=n;j++)
            {
                num=(a[j]-a[j-i])*1.0/i;
                if(num>maxl)
                    maxl=num;
            }
        }
        printf("%.15lf\n",maxl);
    }

    return 0;
}


#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main()
{
    int n,K,k,i,j,d;

    while(~scanf("%d%d",&n,&k))
    {
        int a[5678];
        a[0]=0;

        double num=0,maxl=0;

        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            a[i]+=a[i-1];
        }
        for(i=k;i<=n;i++)
        {
            for(j=i;j<=n;j++)
            {
                maxl=max(maxl,(a[j]-a[j-i])*1.0/i);
            }
        }
        printf("%.15lf\n",maxl);
    }

    return 0;
}


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="qwer" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/qwer" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/qwer" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-fexceptions" />
		</Compiler>
		<Unit filename="main.cpp" />
		<Extensions>
			<code_completion />
			<envvars />
			<debugger />
		</Extensions>
	</Project>
</CodeBlocks_project_file>


#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = (1LL << 60) - 1;
const LL MOD = 1e9 + 7;
const LL N = 200005;
int dx[] = { -1, 0, 1, 0 };
int dy[] = { 0, 1, 0, -1 };
int main() {
    //freopen("input.txt", "r", stdin);
   //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    int n, k;
    cin >> n >> k;
    int a[1001];
    forn(i, n) {
        cin >> a[i];
    }
    double ans = 0.0;
    forn(i, n) {
        double sum = 0.0;
        for (int j = i; j < n; j++) {
            sum += a[j];
            if (j - i + 1 >= k) {
                ans = max(ans, sum / (j - i + 1));
            }
        }
    }
    cout << ans << endl;
    return 0;
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = (1LL << 60) - 1;
const LL MOD = 1e9 + 7;
const LL N = 200005;
int dx[] = { -1, 0, 1, 0 };
int dy[] = { 0, 1, 0, -1 };
int main() {
    //freopen("input.txt", "r", stdin);
   //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    int n, k;
    cin >> n >> k;
    int a[5002];
    forn(i, n) {
        cin >> a[i];
    }
    double ans = 0.0;
    forn(i, n) {
        double sum = 0.0;
        for (int j = i; j < n; j++) {
            sum += a[j];
            if (j - i + 1 >= k) {
                ans = max(ans, sum / (j - i + 1));
            }
        }
    }
    cout << ans << endl;
    return 0;
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = (1LL << 60) - 1;
const LL MOD = 1e9 + 7;
const LL N = 200005;
int dx[] = { -1, 0, 1, 0 };
int dy[] = { 0, 1, 0, -1 };
int a[1005], b[1005], ac[10], bc[10];
int main() {
    //freopen("input.txt", "r", stdin);
   //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    int n, k;
    cin >> n >> k;
    vector <int> a(n);
    forn(i, n) {
        cin >> a[i];
    }
    double ans = 0.0;
    for (int i = 0; i < n; i++) {
        double t = 0.0;
        for (int j = i; j < k; j++) {
            t += a[j];
        }
        ans = max(ans, t / k);
    }
    cout << ans << endl;
}


#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
#include<stack>
using namespace std;
#define FIO ios_base::sync_with_stdio(false); cin.tie(NULL)
#define pii pair<int, int>

int N, K;
int sum[5001];

double measure(int x, int y) {
	return (double)((double)(sum[y] - sum[x - 1]) / (double)(y - x + 1));
}

int main(void) {
	FIO;

	cin >> N >> K;

	for (int i = 1; i <= N; i++)
	{
		int v;
		cin >> v;

		sum[i] = sum[i - 1] + v;
	}
	double ans = 0;

	for (int i = K; i <= N; i++)
	{
		for (int j = 1; j + i - 1 <= N; j++)
		{
			ans = max(measure(j, j + i - 1), ans);
		}
	}
	cout << ans;
}


#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
#include<stack>
using namespace std;
#define FIO ios_base::sync_with_stdio(false); cin.tie(NULL)
#define pii pair<int, int>

int N, K;
int sum[5001];

double measure(int x, int y) {
	return (double)((double)(sum[y] - sum[x - 1]) / (double)(y - x + 1));
}

int main(void) {
	FIO;

	cin >> N >> K;

	for (int i = 1; i <= N; i++)
	{
		int v;
		cin >> v;

		sum[i] = sum[i - 1] + v;
	}
	double ans = 0;

	for (int i = K; i <= N; i++)
	{
		for (int j = 1; j + i - 1 <= N; j++)
		{
			ans = max(measure(j, j + i - 1), ans);
		}
	}
	cout.precision(15);
	cout << ans;
}


#include<iostream>
#include<vector>
using namespace std;

int main() {
	cin.tie(NULL);
	ios::sync_with_stdio(false);
	int n, k, input;
	cin >> n >> k;
	vector<long long> psum;
	psum.push_back(0);
	for (int i = 1; i <= n; ++i) {
		cin >> input;
		psum.push_back(psum[i - 1] + input);
	}
	double max = 0;
	for (int i = 0; i <= n - k; ++i) {
		for (int j = i + k; j <= n; ++j) {
			double temp = (double)(psum[j] - psum[i]) / (j - i);
			max = temp > max ? temp : max;
		}
	}
	cout.precision(8);
	cout << max << '\n';
}


#include<iostream>
#include<vector>
using namespace std;

int main() {
	cin.tie(NULL);
	ios::sync_with_stdio(false);
	int n, k, input;
	cin >> n >> k;
	vector<long long> psum;
	psum.push_back(0);
	for (int i = 1; i <= n; ++i) {
		cin >> input;
		psum.push_back(psum[i - 1] + input);
	}
	double max = 0;
	for (int i = 0; i <= n - k; ++i) {
		for (int j = i + k; j <= n; ++j) {
			double temp = (double)(psum[j] - psum[i]) / (j - i);
			max = temp > max ? temp : max;
		}
	}
	cout.precision(16);
	cout << max << '\n';
}


#include <iostream>
#include <iomanip>
#include <algorithm>
using namespace std;
int n, k;
int arr[5001];
double bestans = 0;
int main() {
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		cin >> arr[i];
	}
	for (int i = 0; i < n; i++) {
		int totsum = 0;
		for (int j = i; j < min(n, i + k - 1); j++) {
			totsum += arr[j];
		}
		for (int j = i + k - 1; j < n; j++) {
			totsum += arr[j];
			bestans = max(bestans, totsum / (double)(j - i + 1));
		}
	}
	cout << fixed << setprecision(12) << bestans << '\n';
}


#include<iostream>
#include<string>
#include<fstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<cstdlib>
#include<vector>
#include<set>
using namespace std;
ofstream fo("test.out");
ifstream fi("test.inp");
#define For(i,n) for (long long(i) = 0; (i)<(n); (i)++)
#define For1(i,n) for (long long(i) = 1; (i) <= (n); (i)++)
#define Forlr(i,l,r) for (long long(i) = (l); (i) <= (r); (i)++)
#define Forrl(i,r,l) for (long long(i) = (r); (i) >= (l); (i)--)
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
const ll MOD = 1e9 + 7;
const ll base = 269;
const int N = 1e5 + 5;
/*
MIKUNO - 15/02/1999
*/
ll n, m, q, rs, k;
ll a[5005];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> n >> k;
	For(i, n)
		cin >> a[i];
	double ans = 0;
	For(i, n)
	{
		ll sum = a[i], t = 1;
		Forlr(j, i + 1, n -1)
		{
			t++;
			sum += a[j];
			if (t >= k)
				ans = max(ans, double(sum) / double(t));
		}
	}
	printf("%.10f", ans);
	//system("pause");
	return 0;
}


#include<iostream>
#include<string>
#include<fstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<cstdlib>
#include<vector>
#include<set>
using namespace std;
ofstream fo("test.out");
ifstream fi("test.inp");
#define N 100005
//#define mod 1000000007
#define For for(long long i=1;i<=n;i++)
#define For2 for(long long j=0;j<m;j++)
#define ll long long
const ll MOD = 1e9 + 7;
const ll base = 269;
// for(long long i=1;i<=n;i++)
/*
MIKUNO - 15/02/1999
*/
//const int nmax = 2e5 + 5;
ll n, x, temp, rs, k;
double a[5005];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> n >> k;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		a[i] += a[i - 1];
	}
	double rs = 0;
	for (int i = k; i <= n; i++)
	{
		rs = max(rs, (a[i] - a[i - k]) / (double)k);
	}
	printf("%.10f", rs);
	//system("pause");
	return 0;
}


#include<iostream>
#include<string>
#include<fstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<cstdlib>
#include<vector>
#include<set>
using namespace std;
ofstream fo("test.out");
ifstream fi("test.inp");
#define For(i,n) for (long long(i) = 0; (i)<(n); (i)++)
#define For1(i,n) for (long long(i) = 1; (i) <= (n); (i)++)
#define Forlr(i,l,r) for (long long(i) = (l); (i) <= (r); (i)++)
#define Forrl(i,r,l) for (long long(i) = (r); (i) >= (l); (i)--)
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
const ll MOD = 1e9 + 7;
const ll base = 269;
const int N = 1e5 + 5;
/*
MIKUNO - 15/02/1999
*/
ll n, m, q, rs, k;
ll a[5005];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> n >> k;
	For(i, n)
		cin >> a[i];
	double ans = 0;
	For(i, n)
	{
		ll sum = a[i], t = 1;
		Forlr(j, i + 1, n -1)
		{
			if (t >= k)
				ans = max(ans, double(sum) / double(t));
			t++;
			sum += a[j];
			if (t >= k)
				ans = max(ans, double(sum) / double(t));
		}
	}
	printf("%.10f", ans);
	//system("pause");
	return 0;
}


#include<iostream>
#include<string>
#include<fstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<cstdlib>
#include<vector>
#include<set>
using namespace std;
ofstream fo("test.out");
ifstream fi("test.inp");
#define For(i,n) for (long long(i) = 0; (i)<(n); (i)++)
#define For1(i,n) for (long long(i) = 1; (i) <= (n); (i)++)
#define Forlr(i,l,r) for (long long(i) = (l); (i) <= (r); (i)++)
#define Forrl(i,r,l) for (long long(i) = (r); (i) >= (l); (i)--)
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
const ll MOD = 1e9 + 7;
const ll base = 269;
const int N = 1e5 + 5;
/*
MIKUNO - 15/02/1999
*/
ll n, m, q, rs, k;
ll a[5005];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> n >> k;
	For(i, n)
		cin >> a[i];
	double ans = 0;
	For(i, n)
	{
		ll sum = a[i], t = 1;
		if (t >= k)
			ans = max(ans, double(sum) / double(t));
		Forlr(j, i + 1, n -1)
		{
			t++;
			sum += a[j];
			if (t >= k)
				ans = max(ans, double(sum) / double(t));
		}
	}
	printf("%.10f", ans);
	//system("pause");
	return 0;
}


#include <iostream>
#include <algorithm>
#include <queue>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
using namespace std;
typedef long long ll;/*
int main()
{
	int a,b,x;
	cin>>a>>b>>x;
	string s="";
	for(int i=0;i<a;++i)
		s+="0";
	for(int i=0;i<b;++i)
		s+="1";
	int flag=1;
	int cnt=0;
	for(int i=0;i<a+b-1;++i)
		if(s[i]!=s[i+1])
			cnt++;
	if(cnt==x){
		cout<<s<<endl;
		return 0;
	}
	while(next_permutation(s.begin(),s.end())){
		for(int i=0;i<a+b-1;++i)
			if(s[i]!=s[i+1])
				cnt++;
		if(cnt==x)
			flag=0;
		if(!flag)
			break;
		cnt=0;
	}
	cout<<s<<endl;
	return 0;
}*/
double a[5001];
double sum[5001];
int main()
{
	int n,k;
	cin>>n>>k;
	for(int i=1;i<=n;++i){
		scanf("%lf",&a[i]);
		sum[i]=sum[i-1]+a[i];
	}
	double maxx=-1;
	for(int q=k;q<=n;++q)
		for(int i=1;i<=n-q;++i)
			maxx=max((sum[i+q-1]-sum[i-1])/q,maxx);
	printf("%.15lf\n",maxx);
	return 0;
}


#include <iostream>
#include <algorithm>
#include <queue>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
using namespace std;
typedef long long ll;
double a[5001];
double sum[5001];
double maxxx(double a,double b){
	return a>b?a:b;
}
int main()
{
	int n,k;
	cin>>n>>k;
	for(int i=1;i<=n;++i){
		scanf("%lf",&a[i]);
		sum[i]=sum[i-1]+a[i];
	}
	double maxx=0;
	for(int q=k;q<=n;++q){
		for(int i=1;i<=n-q+1;++i){
			maxx=maxxx(((sum[i+q-1]-sum[i-1])/(double)q),maxx);
		//	cout<<((sum[i+q-1]-sum[i-1])/(double)q)<<endl;
		}
	}
	printf("%.15lf\n",maxx);
	return 0;
}
/*
int main()
{
	int a,b,x;
	cin>>a>>b>>x;
	string s="";
	for(int i=0;i<a;++i)
		s+="0";
	for(int i=0;i<b;++i)
		s+="1";
	int flag=1;
	int cnt=0;
	for(int i=0;i<a+b-1;++i)
		if(s[i]!=s[i+1])
			cnt++;
	if(cnt==x){
		cout<<s<<endl;
		return 0;
	}
	while(next_permutation(s.begin(),s.end())){
		for(int i=0;i<a+b-1;++i)
			if(s[i]!=s[i+1])
				cnt++;
		if(cnt==x)
			flag=0;
		if(!flag)
			break;
		cnt=0;
	}
	cout<<s<<endl;
	return 0;
}*/


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <math.h>
#include <iomanip>
using namespace std;
#define forr(i,a,b,c) for(int i=a;i<b;i+=c)
#define forrb(i,a,b,c) for(int i=a;i>b;i-=c)
#define fori(i,n) forr(i,0,n,1)
#define forib(i,n) forrb(i,n-1,-1,1)
#define forn(i,n) forr(i,1,n,1)
#define fornb(i,n) forrb(i,n-1,0,1)
#define fort(i,m,n) forr(i,m,n,1)
#define fortb(i,m,n) forrb(i,n-1,m-1,1)
#define forin(i,arr) fori(i,arr.size())
#define forinb(i,arr) forib(i,arr.size())
#define into(i) cin >> i;
#define def(i) int i; into(i)
#define deft(t,i) t i; into(i)
#define defn def(n)
#define defp def(p)
#define defm def(m)
#define defk def(k)
#define defa def(a)
#define defb def(b)
#define defc def(c)
#define defd def(d)
#define vec(a) vector<a>
#define co cout <<
#define out(a) cout << a <<' ';
#define el << endl;
#define outv(arr,n) fori(i,n){out(arr[i])} co "" el
#define cas(p) co "Case #" << p+1 <<": ";
#define ex return 0;
#define qii queue<int>
#define sti stack<int>
#define dei deque<int>
#define con continue;
#define br break;
#define maxi 1000000013
#define mod %1000000009;
#define wne(arr) while(!arr.empty())
#define all(arr) arr.begin(),arr.end()
#define _230 1073741824
typedef vector<int> veci;
typedef long long lol;
typedef vector<lol> vecl;
#define table(name,n,m) vector<veci> name(n,veci (m));
#define tablel(name,n,m) vector<vecl> name(n,vecl (m));
typedef pair<lol, lol> point;
typedef pair<point, lol> poin;
lol gcd(lol a, lol b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a%b);
}
struct poing {
	int x;
	int y;
	int comp(poing a) {
		if (x == a.x) {
			if (y == a.y) {
				return -1;
			}
			return x;
		}
		if (x == a.y) {
			if (y == a.x) {
				return -1;
			}
			return x;
		}
		if (y == a.x || y == a.y) {
			return y;
		}
		return -1;
	}
};
int countdig(lol n) {
	if (n == 0) {
		return 0;
	}
	return countdig(n / 10) + 1;
}

int main() {
	ios::sync_with_stdio(false);
	defn def( k)
		long double maxm=0;
	veci a(n);
	fori(i, n) {
		into(a[i]);
	}
	fori(i, n-k+1) {
		lol sum = 0;
		fort(j, i, i + k) {
			sum += a[j];
		}
		maxm = max(maxm,(long double) sum / (long double)k);
		fort(j, i + k, n) {
			sum += a[j];
			maxm = max(maxm, (long double)sum / (long double)(j-i+1));
		}
	}
	co setprecision(10) <<maxm el
	ex
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <math.h>
#include <iomanip>
using namespace std;
#define forr(i,a,b,c) for(int i=a;i<b;i+=c)
#define forrb(i,a,b,c) for(int i=a;i>b;i-=c)
#define fori(i,n) forr(i,0,n,1)
#define forib(i,n) forrb(i,n-1,-1,1)
#define forn(i,n) forr(i,1,n,1)
#define fornb(i,n) forrb(i,n-1,0,1)
#define fort(i,m,n) forr(i,m,n,1)
#define fortb(i,m,n) forrb(i,n-1,m-1,1)
#define forin(i,arr) fori(i,arr.size())
#define forinb(i,arr) forib(i,arr.size())
#define into(i) cin >> i;
#define def(i) int i; into(i)
#define deft(t,i) t i; into(i)
#define defn def(n)
#define defp def(p)
#define defm def(m)
#define defk def(k)
#define defa def(a)
#define defb def(b)
#define defc def(c)
#define defd def(d)
#define vec(a) vector<a>
#define co cout <<
#define out(a) cout << a <<' ';
#define el << endl;
#define outv(arr,n) fori(i,n){out(arr[i])} co "" el
#define cas(p) co "Case #" << p+1 <<": ";
#define ex return 0;
#define qii queue<int>
#define sti stack<int>
#define dei deque<int>
#define con continue;
#define br break;
#define maxi 1000000013
#define mod %1000000009;
#define wne(arr) while(!arr.empty())
#define all(arr) arr.begin(),arr.end()
#define _230 1073741824
typedef vector<int> veci;
typedef long long lol;
typedef vector<lol> vecl;
#define table(name,n,m) vector<veci> name(n,veci (m));
#define tablel(name,n,m) vector<vecl> name(n,vecl (m));
typedef pair<lol, lol> point;
typedef pair<point, lol> poin;
lol gcd(lol a, lol b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a%b);
}
struct poing {
	int x;
	int y;
	int comp(poing a) {
		if (x == a.x) {
			if (y == a.y) {
				return -1;
			}
			return x;
		}
		if (x == a.y) {
			if (y == a.x) {
				return -1;
			}
			return x;
		}
		if (y == a.x || y == a.y) {
			return y;
		}
		return -1;
	}
};
int countdig(lol n) {
	if (n == 0) {
		return 0;
	}
	return countdig(n / 10) + 1;
}

int main() {
	ios::sync_with_stdio(false);
	defn def( k)
		long double maxm=0;
	veci a(n);
	fori(i, n) {
		into(a[i]);
	}
	fori(i, n-k) {
		lol sum = 0;
		fort(j, i, i + k) {
			sum += a[j];
		}
		maxm = max(maxm,(long double) sum / (long double)k);
		fort(j, i + k, n) {
			sum += a[j];
			maxm = max(maxm, (long double)sum / (long double)(j-i+1));
		}
	}
	co setprecision(10) <<maxm el
	ex
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <math.h>
#include <iomanip>
using namespace std;
#define forr(i,a,b,c) for(int i=a;i<b;i+=c)
#define forrb(i,a,b,c) for(int i=a;i>b;i-=c)
#define fori(i,n) forr(i,0,n,1)
#define forib(i,n) forrb(i,n-1,-1,1)
#define forn(i,n) forr(i,1,n,1)
#define fornb(i,n) forrb(i,n-1,0,1)
#define fort(i,m,n) forr(i,m,n,1)
#define fortb(i,m,n) forrb(i,n-1,m-1,1)
#define forin(i,arr) fori(i,arr.size())
#define forinb(i,arr) forib(i,arr.size())
#define into(i) cin >> i;
#define def(i) int i; into(i)
#define deft(t,i) t i; into(i)
#define defn def(n)
#define defp def(p)
#define defm def(m)
#define defk def(k)
#define defa def(a)
#define defb def(b)
#define defc def(c)
#define defd def(d)
#define vec(a) vector<a>
#define co cout <<
#define out(a) cout << a <<' ';
#define el << endl;
#define outv(arr,n) fori(i,n){out(arr[i])} co "" el
#define cas(p) co "Case #" << p+1 <<": ";
#define ex return 0;
#define qii queue<int>
#define sti stack<int>
#define dei deque<int>
#define con continue;
#define br break;
#define maxi 1000000013
#define mod %1000000009;
#define wne(arr) while(!arr.empty())
#define all(arr) arr.begin(),arr.end()
#define _230 1073741824
typedef vector<int> veci;
typedef long long lol;
typedef vector<lol> vecl;
#define table(name,n,m) vector<veci> name(n,veci (m));
#define tablel(name,n,m) vector<vecl> name(n,vecl (m));
typedef pair<lol, lol> point;
typedef pair<point, lol> poin;
lol gcd(lol a, lol b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a%b);
}
struct poing {
	int x;
	int y;
	int comp(poing a) {
		if (x == a.x) {
			if (y == a.y) {
				return -1;
			}
			return x;
		}
		if (x == a.y) {
			if (y == a.x) {
				return -1;
			}
			return x;
		}
		if (y == a.x || y == a.y) {
			return y;
		}
		return -1;
	}
};
int countdig(lol n) {
	if (n == 0) {
		return 0;
	}
	return countdig(n / 10) + 1;
}

int main() {
	ios::sync_with_stdio(false);
	defn def( k)
		long double maxm=0;
	veci a(n);
	fori(i, n) {
		into(a[i]);
	}
	fori(i, n-k) {
		long double sum = 0;
		fort(j, i, i + k) {
			sum += a[j];
		}
		maxm = max(maxm, sum / k);
		fort(j, i + k, n) {
			sum += a[j];
			maxm = max(maxm, sum / (j-i+1));
		}
	}
	co setprecision(10) <<maxm el
	ex
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <math.h>
#include <iomanip>
using namespace std;
#define forr(i,a,b,c) for(int i=a;i<b;i+=c)
#define forrb(i,a,b,c) for(int i=a;i>b;i-=c)
#define fori(i,n) forr(i,0,n,1)
#define forib(i,n) forrb(i,n-1,-1,1)
#define forn(i,n) forr(i,1,n,1)
#define fornb(i,n) forrb(i,n-1,0,1)
#define fort(i,m,n) forr(i,m,n,1)
#define fortb(i,m,n) forrb(i,n-1,m-1,1)
#define forin(i,arr) fori(i,arr.size())
#define forinb(i,arr) forib(i,arr.size())
#define into(i) cin >> i;
#define def(i) int i; into(i)
#define deft(t,i) t i; into(i)
#define defn def(n)
#define defp def(p)
#define defm def(m)
#define defk def(k)
#define defa def(a)
#define defb def(b)
#define defc def(c)
#define defd def(d)
#define vec(a) vector<a>
#define co cout <<
#define out(a) cout << a <<' ';
#define el << endl;
#define outv(arr,n) fori(i,n){out(arr[i])} co "" el
#define cas(p) co "Case #" << p+1 <<": ";
#define ex return 0;
#define qii queue<int>
#define sti stack<int>
#define dei deque<int>
#define con continue;
#define br break;
#define maxi 1000000013
#define mod %1000000009;
#define wne(arr) while(!arr.empty())
#define all(arr) arr.begin(),arr.end()
#define _230 1073741824
typedef vector<int> veci;
typedef long long lol;
typedef vector<lol> vecl;
#define table(name,n,m) vector<veci> name(n,veci (m));
#define tablel(name,n,m) vector<vecl> name(n,vecl (m));
typedef pair<lol, lol> point;
typedef pair<point, lol> poin;
lol gcd(lol a, lol b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a%b);
}
struct poing {
	int x;
	int y;
	int comp(poing a) {
		if (x == a.x) {
			if (y == a.y) {
				return -1;
			}
			return x;
		}
		if (x == a.y) {
			if (y == a.x) {
				return -1;
			}
			return x;
		}
		if (y == a.x || y == a.y) {
			return y;
		}
		return -1;
	}
};
int countdig(lol n) {
	if (n == 0) {
		return 0;
	}
	return countdig(n / 10) + 1;
}

int main() {
	ios::sync_with_stdio(false);
	defn defk
		int sum = 0,max=0;
	veci a(n);
	fori(i, k) {
		into(a[i]);
		sum += a[i];
	}
	fort(i, k,n) {
		if (sum > max) {
			max = sum;
		}
		into(a[i]);
		sum += a[i];
		sum -= a[i-k];
	}
	if (sum > max) {
		max = sum;
	}
	co setprecision(10) <<(long double)max/ (long double)k el
	ex
}


#include <iostream>
#include <cstdio>
using namespace std;
const int maxn = 5000+5;
int n,k,a[maxn],sum[maxn];
double avg;

int main()
{
    cin>>n>>k;
    for(int i=0;i<n;i++)
        cin>>a[i];
    sum[0]=a[0];
    for(int i=1;i<n;i++)
        sum[i]=sum[i-1]+a[i];
    for(int j=k;j<=n;j++)
    {
        for(int i=0;i+j-1<n;i++)
            avg=max(avg,(sum[i+j-1]-sum[i-1])*1.0/j);
    }
    printf("%.15f",avg);
    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;
const int maxn = 5000+5;
int n,k,a[maxn],sum[maxn];
double avg;

int main()
{
    cin>>n>>k;
    for(int i=0;i<n;i++)
        cin>>a[i];
    sum[0]=a[0];
    for(int i=1;i<n;i++)
        sum[i]=sum[i-1]+a[i];
    for(int j=k;j<=n;j++)
    {
        for(int i=0;i+j-1<n;i++)
            avg=max(avg,(sum[i+j-1]-sum[i-1])*1.0/j);
    }
    printf("%.8f",avg);
    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;
const int maxn = 5000+5;
int n,k,a[maxn],sum[maxn],cnt;
double avg;

int main()
{
    cin>>n>>k;
    for(int i=0;i<n;i++)
        cin>>a[i];
    sum[0]=a[0];
    for(int i=1;i<n;i++)
        sum[i]=sum[i-1]+a[i];
    for(int j=k;j<=n;j++)
    {
        for(int i=0;i+j-1<n;i++)
            avg=max(avg,(sum[i+j-1]-sum[i-1])*1.0/j);
    }
    printf("%.8f",avg);
    return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{

	int n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i < n;i++)
	{
		avg = a[i];

	for (int j = i + 1;j < i + k;j++)
	{
		avg += a[j];
	}

	avg = avg / k;
	mx = max(mx, avg);
}
	cout << avg << endl;
	//system("pause");
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{

	int n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i < n;i++)
	{
		avg = a[i];

	for (int j = i + 1;j < i + k;j++)
	{
		avg += a[j];
	}

	avg /= double(k);
	mx = max(mx, avg);
}
	cout << avg << endl;
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{

	double n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i <= n - k;i++)
	{
		avg = a[i];

		for (int j = i + 1;j < i + k;j++)
		{
			avg += a[j];

		}

		avg = avg / k;

		mx = max(mx, avg);
	}
	printf("%.15lf\n", mx);
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{
	//Wow.. I didn't even read the question :-))

	double n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i <= n - k;i++)
	{
		avg = a[i];

		int c = 1;
		for (int j = i + 1;j < n;j++)
		{
			c++;
			avg += a[j];
			if (c >= k)
				mx = max(mx, avg / c);

		}

	}
	printf("%.15lf\n", mx);
	//system("pause");
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{

	int n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i < n;i++)
	{
		avg = a[i];

	for (int j = i + 1;j < i + k;j++)
	{
		avg += a[j];
	}

	avg = avg / k;
	mx = max(mx, avg);
}
	printf("%.15f\n", avg);
	//system("pause");
	return 0;
}


//Can't believe how bad I did for such an easy contest (>.>)
#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{

	int n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i <= n - k;i++)
	{
		avg = a[i];

		for (int j = i + 1;j < i + k;j++)
		{
			avg += a[j];

		}

		avg = avg / k;

		mx = max(mx, avg);
	}
	printf("%.15f\n", mx);

	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{
	//Wow.. I didn't even read the question :-))

	double n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i <= n - k;i++)
	{
		avg = 0;
		double c = 0;
		for (int j = i;j < n;j++)
		{
			c++;
			avg += a[j];
			if (c >= k)
				mx = max(mx, avg / c);

		}

	}
	printf("%.15lf\n", mx);
	//system("pause");
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{

	double n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i <= n - k;i++)
	{
		avg = a[i];

		for (int j = i + 1;j < i + k;j++)
		{
			avg += a[j];

		}

		avg = avg / k;

		mx = max(mx, avg);
	}
	printf("%.15f\n", mx);
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <stack>

using namespace std;
int a[5001];

int main()
{

	double n, k;
	cin >> n >> k;
	double avg;
	double mx = 0;
	for (int i = 0;i < n;i++)
		cin >> a[i];

	for (int i = 0;i <= n - k;i++)
	{
		avg = a[i];

		for (int j = i + 1;j < i + k;j++)
		{
			avg += a[j];

		}

		avg = avg / k;

		mx = max(mx, avg);
	}
	cout << mx << endl;
	return 0;
}


#include <stdio.h>
#include <time.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <map>
#include <string>
#include <vector>
#include <list>
#include <iostream>
#include <sstream>
#include <queue>
#include <algorithm>
#include <fstream>
#include <iomanip>

using namespace std;

#define INF 2000000000
#define FT first
#define SD second
#define PB push_back
#define ll long long
#define PB 		push_back
#define FOR(a,start,end) 	for(int a=int(start); a<int(end); a++)
//#define INF 		int_MAX
#define SORT(a) 	sort(a.begin(),a.end())
#define CL(a,x) 		memset(a,x,sizeof(a))
#define REP(a,x)	for(int a=0;a<x;a++)
#define REP1(a,x)	for(int a=1;a<=x;a++)
#define MP 		make_pair
#define vi vector<int>
#define vvi vector<vector<int> >
#define vii vector<pair<ll,ll> >
#define vvii vector<vector<pair<int,int> > >
#define pii pair<int,int>
#define vs vector<string>
int s, c, i, k, j, n, m, z, b, q;
int t, cas, d, i1, a, i2, r, v, k1, k2;
int ta[500][500];
vs vd, vx, vg;
vi vk, va, vb, vz, vc;
vvi vvk;
vii vkx, vkx0;;
vvii vvkx;
string w, w1, w2;
priority_queue<pii> pq;
pii p1;
int main() {
	//freopen( "c:\\wojtek\\uva\\uva\\debug\\t1.in", "rt", stdin);

	//pi=2*acos(0.0);

	//d=1000000007;
	cin >> n >> k;
	vk.clear();

	for (int i = 0; i < n; i++) {
		cin >> a;
		vk.push_back(a);
	}
	z = 0;
	int z1 = z;
	d = k;
	for (; k <= n; k++) {
		a = 0;
		z = 0;
		for (int i = 0; i < k; i++) {
			a += vk[i];
		}
		z = a;
		for (int i = k; i < n; i++) {
			a -= vk[i - k];
			a += vk[i];
			z = max(z, a);
		}
		if (d*z > k*z1) {
			d = k;
			z1 = z;
		}
	}
	cout<<setprecision(15) << ((double)z1)/(double)d << endl;

	return 0;

}


#include <stdio.h>
#include <time.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <map>
#include <string>
#include <vector>
#include <list>
#include <iostream>
#include <sstream>
#include <queue>
#include <algorithm>
#include <fstream>
#include <iomanip>

using namespace std;

#define INF 2000000000
#define FT first
#define SD second
#define PB push_back
#define ll long long
#define PB 		push_back
#define FOR(a,start,end) 	for(int a=int(start); a<int(end); a++)
//#define INF 		int_MAX
#define SORT(a) 	sort(a.begin(),a.end())
#define CL(a,x) 		memset(a,x,sizeof(a))
#define REP(a,x)	for(int a=0;a<x;a++)
#define REP1(a,x)	for(int a=1;a<=x;a++)
#define MP 		make_pair
#define vi vector<ll>
#define vvi vector<vector<int> >
#define vii vector<pair<int,int> >
#define vvii vector<vector<pair<int,int> > >
#define pii pair<int,int>
#define vs vector<string>
ll s, c, i, k, j, n, m, z, b, q;
ll t, cas, d, i1, a, i2, r, v, k1, k2;
int ta[500][500];
vs vd, vx, vg;
vi vk, va, vb, vz, vc;
vvi vvk;
vii vkx, vkx0;;
vvii vvkx;
string w, w1, w2;
priority_queue<pii> pq;
pii p1;
int main() {
	//freopen( "c:\\wojtek\\uva\\uva\\debug\\t1.in", "rt", stdin);

	//pi=2*acos(0.0);

	//d=1000000007;
	cin >> n >> k;
	vk.clear();

	for (int i = 0; i < n; i++) {
		cin >> a;
		vk.push_back(a);
	}
	z = 0;
	ll z1 = z;
	d = k;
	for (; k <= n; k++) {
		a = 0;
		z = 0;
		for (int i = 0; i < k; i++) {
			a += vk[i];
		}
		z = a;
		for (int i = k; i < n; i++) {
			a -= vk[i - k];
			a += vk[i];
			z = max(z, a);
		}
		if (d*z > k*z1) {
			d = k;
			z1 = z;
		}
	}
	cout<<setprecision(15) << ((double)z1)/(double)d << endl;

	return 0;

}


#include<iostream>
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <string>
#include <vector>
#include <cstring>
#include <cstdio>
#include <utility>
#include <algorithm>
#include <functional>
using namespace std;
typedef long long ll;
double a[5050],t,s[5050],ss;
int n, k, i, j;
int main() {
	scanf("%d%d", &n, &k);
	ss = 0;
	for (i = 1; i <= n; i++) {
		scanf("%lf", &a[i]);
		ss += a[i];
		s[i] = ss;
	}
	s[0] = 0;
	double wa = 0;
	for (i = 1; i <= n; i++) {
		for (j = i + k-1; j <= n; j++) {
			wa = max(wa, (s[j] - s[i - 1]) / (j - i + 1));
		}
	}
	printf("%.9f\n", wa);
}


#include<iostream>
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <string>
#include <vector>
#include <cstring>
#include <cstdio>
#include <utility>
#include <algorithm>
#include <functional>
using namespace std;
typedef long long ll;
double a[5050],t,s[5050],ss;
int n, k, i, j;
int main() {
	scanf("%d%d", &n, &k);
	ss = 0;
	for (i = 1; i <= n; i++) {
		scanf("%lf", &a[i]);
		ss += a[i];
		s[i] = ss;
	}
	s[0] = 0;
	double wa = 0;
	for (i = 1; i <= n; i++) {
		for (j = i + k-1; j <= n; j++) {
			wa = max(wa, (s[j] - s[i - 1]) / j - i + 1);
		}
	}
	printf("%.9f\n", wa);
}


#include<iostream>
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <string>
#include <vector>
#include <cstring>
#include <cstdio>
#include <utility>
#include <algorithm>
#include <functional>
using namespace std;
typedef long long ll;
int n, q, a[40],d[40],wa;
int main() {
	int i, j;
	scanf("%d%d", &n, &q);
	for (i = 0; i < n; i++) {
		scanf("%d", &j);
		int t = log(j) / log(2);
		a[t]++;
	}
	int tmp,num;
	for (i = 0; i < q; i++) {
		scanf("%d", &tmp);
		wa = 0;
		num = 0;
		for (j = 31; j >= 0; j--) {
			if (tmp&(1 << j)) {
				num++;
			}
			if (a[j] >= num) {
				wa += num;
				num = 0;
			}
			else {
				wa += a[j];
				num -= a[j];
			}
			num *= 2;
		}
		if (num > 0)printf("-1\n");
		else printf("%d\n", wa);
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include <cmath>
#include<map>
using namespace std;

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n, k;
	double ans = -1;
	cin >> n >> k;
	vector<double>s(n);
	cin >> s[0];
	for (int i = 1; i < n; i++) {
		cin >> s[i];
		s[i] += s[i - 1];
	}
	for(int j=k;j<=n;j++)
	for (int i = j - 1; i < n; i++) {
		ans = max(ans, (s[i] - (i-j>=0?s[i - j]:0)) / j);
	}
	printf("%.10f",ans);
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include <cmath>
#include<map>
using namespace std;

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n, k;
	double ans = -1;
	cin >> n >> k;
	vector<double>s(n);
	cin >> s[0];
	for (int i = 1; i < n; i++) {
		cin >> s[i];
		s[i] += s[i - 1];
	}
	for (int i = k - 1; i < n; i++) {
		ans = max(ans, (s[i] - s[i - k + 1]) / k);
	}
	printf("%.10f",ans);
}


#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include <cmath>
#include<map>
using namespace std;

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n, k;
	double ans = -1;
	cin >> n >> k;
	vector<double>s(n);
	cin >> s[0];
	for (int i = 1; i < n; i++) {
		cin >> s[i];
		s[i] += s[i - 1];
	}
	for (int i = k - 1; i < n; i++) {
		ans = max(ans, (s[i] - (i-k>=0?s[i - k]:0)) / k);
	}
	printf("%.10f",ans);
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define mod 1000000007
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.14159265359
#define eps  1e-9

LL maxx(LL a , LL b){ return a>b ?  a : b ;}
LL minn(LL a , LL b){ return a>b ?  b : a ;}

using namespace std;
int dx[] = {1 , 1 ,1 , 0 , 0  , -1 , -1  , -1  , 0 };
int dy[] = { -1 , 0  , 1 , 1 , -1 , 0 , 1 , -1 , 0 };
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return (a*b)/gcd(a , b);
}
LL poww(LL base, LL exp){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int main()
{
    int n , k ; cin >> n >> k ;

    double ans = 0 ; vector<double>a ;

    for(int i = 0 ; i < n ; i++){
        double x ; cin >> x ;
        a.pb(x) ;
    }

    for(int i = k ; i <= n ; i++){

        for(int j = 0 ; j <= n - i ; j++){
            double temp = 0 ;
            for(int idx = j ; idx < j + i ; idx++){
                temp = temp + a[idx] ;
            }
            ans = max(ans , temp / double(i)) ;
        }
    }

    cout << setprecision(20) << ans << endl ;
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define mod 1000000007
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.14159265359
#define eps  1e-9

LL maxx(LL a , LL b){ return a>b ?  a : b ;}
LL minn(LL a , LL b){ return a>b ?  b : a ;}

using namespace std;
int dx[] = {1 , 1 ,1 , 0 , 0  , -1 , -1  , -1  , 0 };
int dy[] = { -1 , 0  , 1 , 1 , -1 , 0 , 1 , -1 , 0 };
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return (a*b)/gcd(a , b);
}
LL poww(LL base, LL exp){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
double pref[5003] ;
int main()
{
    int n , k ; cin >> n >> k ;

    double ans = 0 ; vector<double>a ;

    for(int i = 0 ; i < n ; i++){
        double x ; cin >> x ;
        a.pb(x) ; pref[i + 1] = pref[i] + x ;
    }

    for(int i = k ; i <= n ; i++){

        for(int j = 0 ; j <= n - i ; j++){
            double temp = pref[j + i] - pref[j] ;
            ans = max(ans , temp / double(i)) ;
        }
    }

    cout << setprecision(20) << ans << endl ;
}


#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:256000000")

#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

typedef long double ld;
typedef long long ll;	// Use "%I64d" as placeholder with printf and scanf.
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef complex<double> cd;
typedef vector<cd> vcd;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<string> vs;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<vpll> vvpll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef priority_queue<ll, vector<ll>, greater<ll>> min_heap_ll;
typedef priority_queue<ll, vector<ll>, less<ll>> max_heap_ll;

#define pi 3.141592653589793238462643383279502884197169399375105820974944592307816406286
#define f(i, n) for(ll i=0; i<n; ++i)
#define fi(i, n, j) for(ll i=j; i<n; ++i)
#define mp make_pair
#define all(container) container.begin(), container.end()
#define allr(container) container.rbegin(), container.rend()
#define tr(container, it) for (decltype(container.begin()) it = container.begin(); it != container.end(); it++)
#define trr(container, it) for (decltype(container.rbegin()) it = container.rbegin(); it != container.rend(); it++)
#define dist(a, b) sqrtl(powl(ld(a.first - b.first), 2) + powl(ld(a.second - b.second), 2))

// useful functions
ll gcd(ll a, ll b)
{
	return b ? gcd(b, a % b) : a;
}

ll my_exp(ll a, ll b, ll MOD = numeric_limits<ll>::max())
{
	a %= MOD;
	return b ? (((b % 2 == 1 ? a : 1) * my_exp(a * a, b / 2, MOD)) % MOD) : 1;
}

bool is_prime(ll n)	// O(sqrt(n)) implementation check for 0 and 1 separately
{
	if (n != 2 && n % 2 == 0) return false;
	else { for (ll i = 3; (i*i) <= n; i += 2) if (n%i == 0) return false; return true; }
}

// Program global variables

// Program classes and structs

// Program functions

int main()
{
#ifdef _CODE_SOURCE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	double start_time = clock();
#endif
	// Program Code
	ll n, k0; cin >> n >> k0;
	vll a(n); f(i, n) cin >> a[i];
	ld g_ans = 0.0;
	fi(k, n + 1, k0)
	{
		ld ans = 0.0;
		f(i, n - k + 1)
		{
			if (i == 0)
			{
				f(j, k)
				{
					ans += a[j];
				}
			}
			else
			{
				ans -= a[i-1];
				ans += a[i + k - 1];
			}
			g_ans = max(g_ans, ans / k);
		}
	}
	cout << fixed << setprecision(16) << g_ans;

	// Program Code Ends
#ifdef _CODE_SOURCE
	double end_time = clock();
	printf("\nTime = %.3f seconds\n", (end_time - start_time) / CLOCKS_PER_SEC);
#endif
	return(0);
}


#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:256000000")

#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

typedef long double ld;
typedef long long ll;	// Use "%I64d" as placeholder with printf and scanf.
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef complex<double> cd;
typedef vector<cd> vcd;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<string> vs;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;
typedef vector<vpll> vvpll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef priority_queue<ll, vector<ll>, greater<ll>> min_heap_ll;
typedef priority_queue<ll, vector<ll>, less<ll>> max_heap_ll;

#define pi 3.141592653589793238462643383279502884197169399375105820974944592307816406286
#define f(i, n) for(ll i=0; i<n; ++i)
#define fi(i, n, j) for(ll i=j; i<n; ++i)
#define mp make_pair
#define all(container) container.begin(), container.end()
#define allr(container) container.rbegin(), container.rend()
#define tr(container, it) for (decltype(container.begin()) it = container.begin(); it != container.end(); it++)
#define trr(container, it) for (decltype(container.rbegin()) it = container.rbegin(); it != container.rend(); it++)
#define dist(a, b) sqrtl(powl(ld(a.first - b.first), 2) + powl(ld(a.second - b.second), 2))

// useful functions
ll gcd(ll a, ll b)
{
	return b ? gcd(b, a % b) : a;
}

ll my_exp(ll a, ll b, ll MOD = numeric_limits<ll>::max())
{
	a %= MOD;
	return b ? (((b % 2 == 1 ? a : 1) * my_exp(a * a, b / 2, MOD)) % MOD) : 1;
}

bool is_prime(ll n)	// O(sqrt(n)) implementation check for 0 and 1 separately
{
	if (n != 2 && n % 2 == 0) return false;
	else { for (ll i = 3; (i*i) <= n; i += 2) if (n%i == 0) return false; return true; }
}

// Program global variables

// Program classes and structs

// Program functions

int main()
{
#ifdef _CODE_SOURCE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	double start_time = clock();
#endif
	// Program Code
	ll n, k0; cin >> n >> k0;
	vll a(n); f(i, n) cin >> a[i];
	ld g_ans = 0.0;
	fi(k, n + 1, k0)
	{
		ld ans = 0.0;
		f(i, n - k + 1)
		{
			if (i == 0)
			{
				f(j, k)
				{
					ans += a[j];
				}
			}
			else
			{
				ans -= a[i];
				ans += a[i + k - 1];
			}
			g_ans = max(g_ans, ans / k);
		}
	}
	cout << fixed << setprecision(16) << g_ans;

	// Program Code Ends
#ifdef _CODE_SOURCE
	double end_time = clock();
	printf("\nTime = %.3f seconds\n", (end_time - start_time) / CLOCKS_PER_SEC);
#endif
	return(0);
}


#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
	int n, k;
	cin >> n >> k;
	vector<int> a(n);
	for (int i = 0; i < n; ++i)
		cin >> a[i];
	double sum = 0;
	for (int i = 0; i < k; ++i)
		sum += a[i];
	double avg = sum / k;
	double ans = avg;
	for (int i = 0, j = k; j < n; ++j) {
		sum += a[j];
		avg = sum / (j - i + 1);
		ans = max(ans, avg);
		while (j - i + 1 > k) {
			if (a[i] >= avg)
				break;
			sum -= a[i];
			++i;
			avg = sum / (j - i + 1);
			ans = max(ans, avg);
		}
	}
	cout << fixed << setprecision(7) << ans;
	return 0;
}


#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
	int n, k, a;
	cin >> n >> k;
	vector<int> p(n + 1);
	for (int i = 1; i <= n; ++i) {
		cin >> a;
		p[i] = p[i - 1] + a;
	}
	double ans = 0;
	for (int i = 0; i <= n - k; ++i)
		for (int j = i + k; j <= n; ++j)
			ans = max(ans, (double)(p[j] - p[i]) / (j - i));
	cout << fixed << setprecision(7) << ans;
	return 0;
}


#include <cstdio>
#include <iostream>
#include <iomanip>
using namespace std;

int main(){

 int n,k,from=0;
 scanf("%d %d",&n,&k);
 double anw=0,s=0,sup=0;
 double *a=new double [n];

 for(int i=0;i<n;i++)
    scanf("%lf",&a[i]);

 while(k<=n){
    for(int i=0;i<k;i++)
        s+=a[i];
    sup=s/k;
    from=0;
    if(anw<sup)anw=sup;
    for(int i=k;i<n;i++){
        s-=a[from];
        s+=a[i];
        sup=s/k;
        if(anw<sup)anw=sup;
        from++;
    }
    k++;
    s=0;
 }
 cout << fixed << setprecision(15) <<anw;
return 0;
}


#include<iostream>
#include<algorithm>
#include <iomanip>
using namespace std;
int n, k, s[5001];
int main() {
	cin >> n >> k;
	double ans = 0;
	for (int i = 1; i <= n; i++) cin >> s[i], s[i] += s[i - 1];
	for (int i = 1; i <= n-k+1; i++) {
		for (int j = i + k - 1; j <= n; j++) {
			//cout << i << " " << j << endl;
			ans = max(ans, (((double)s[j] - (double)s[i - 1])/((double)j- (double)i+ (double)1)));
		}
	}
	//cout << ios::fixed;
	cout.precision(15);
	cout << ans;
	return 0;
}


#include<iostream>
#include<algorithm>
#include <iomanip>
using namespace std;
int n, k, s[5001];
int main() {
	cin >> n >> k;
	float ans = 0;
	for (int i = 1; i <= n; i++) cin >> s[i], s[i] += s[i - 1];
	for (int i = 1; i <= n-k+1; i++) {
		for (int j = i + k - 1; j <= n; j++) {
			//cout << i << " " << j << endl;
			ans = max(ans, (((float)s[j] - (float)s[i - 1])/((float)j- (float)i+ (float)1)));
		}
	}
	printf("%7f",ans);
	return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
double n, k, s[5001];
int main() {
	cin >> n >> k;
	double ans = 0;
	for (int i = 1; i <= n; i++) cin >> s[i], s[i] += s[i - 1];
	for (int i = 1; i <= n-k+1; i++) {
		for (int j = i + k - 1; j <= n; j++) {
			cout << i << " " << j << endl;
			ans = max(ans, ((s[j] - s[i - 1])/(j-i+1)));
		}
	}
	cout << ans;
	return 0;
}


#include<iostream>
#include<algorithm>
using namespace std;
double n, k, s[5001];
int main() {
	cin >> n >> k;
	double ans = 0;
	for (int i = 1; i <= n; i++) cin >> s[i], s[i] += s[i - 1];
	for (int i = 1; i <= n-k+1; i++) {
		for (int j = i + k - 1; j <= n; j++) {
			//cout << i << " " << j << endl;
			ans = max(ans, ((s[j] - s[i - 1])/(j-i+1)));
		}
	}
	cout.unsetf(ios::fixed);
	cout << ans;
	return 0;
}


#include"iostream"
#include"algorithm"
#include"cstring"
#include"cmath"
#include"map"
#include"vector"
#include"stdio.h"
using namespace std;
int a[5005], sum[5005];
int main()
{
    int n, k;
    cin >> n >> k;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    for(int i = 1; i <= n; i ++){
        sum[i] = sum[i - 1] + a[i];
    }
    double ans = 0;
    for(int i = 1; i <= n; i ++){
        for(int j = i + k - 1; j <= n; j ++){
            //cout << i << ' ' << j << endl;
            //cout << (sum[j] - sum[i]) * 1.0 / (j - i + 1) << endl;
            ans = max(ans, (sum[j] - sum[i - 1]) * 1.0 / (j - i + 1));
        }
    }
    printf("%.12lf", ans);
    return 0;
}


#include"iostream"
#include"algorithm"
#include"cstring"
#include"cmath"
#include"map"
#include"vector"
using namespace std;
int a[5005], sum[5005];
int main()
{
    int n, k;
    cin >> n >> k;
    for(int i = 1; i <= n; i ++){
        cin >> a[i];
    }
    for(int i = 1; i <= n; i ++){
        sum[i] = sum[i - 1] + a[i];
    }
    double ans = 0;
    for(int i = 1; i <= n; i ++){
        for(int j = i + k - 1; j <= n; j ++){
            ans = max(ans, (sum[j] - sum[i]) * 1.0 / (j - i + 1));
        }
    }
    cout << ans << endl;
    return 0;
}


import java.util.Scanner;

public class RatingsAndRealityShows {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		int d = scanner.nextInt();
		int start = scanner.nextInt();
		int l = scanner.nextInt();

		int[] one = new int[n], two = new int[n];
		long r = start, s = start, t = start;
		int p = 0;

		for (int i = 0; i < n; i++) {
			one[i] = scanner.nextInt();
			two[i] = scanner.nextInt();
		}

		while (p < n && one[p] < l) {
			if (two[p] == 1)
				r += c;
			else
				r -= d;

			s = Math.min(s, r);
			p++;
		}

		if (s >= 0) {
			System.out.println(0);
			return;
		}

		for (int i = 0; i < n; i++) {
			if (two[i] == 1) {
				r += a - c;
				s += a - c;
				t += a;
			} else {
				r -= b - d;
				s -= b - d;
				t -= b;
			}

			if (t < 0) {
				System.out.println(-1);
				return;
			}

			while (p < n && one[i] + l >= one[p]) {
				if (two[p] == 1)
					r += c;
				else
					r -= d;

					s = Math.min(s, r);
				p++;
			}

			if (s >= 0) {
				System.out.println(one[i] + 1);
				return;
			}
		}

		System.out.println(-1);
	}
}