const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  const a=-tn()+abs(tn()-tn())
  to(a<0?0:a)
}
main()


const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))}
const main=()=>{
  to(-tn()+abs(tn()-tn()))
}
main()


n=int(input())
L=sorted(map(int,input().split()))
ans=L[0]
for i in L[1:]:
    ans+=i
    ans/=2
print(ans)


#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)

def solve(N: int, v: "List[int]"):
    v.sort()
    tmp = (v[0] + v[1]) / 2
    for i in range(2, N):
        tmp = (tmp + v[i]) / 2
    ret = tmp
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    v = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, v)

if __name__ == '__main__':
    main()


N = int(input())
V = list(map(int, input().split()))
V.sort()
ans = V[0]
for v in V[1:]:
    ans = (ans + v) / 2
print(ans)


n = int(input())
arr = list(map(int, input().split()))

for _ in range(n - 1):
    arr.sort()
    new_v = (arr[0] + arr[1]) / 2
    del arr[0:2]
    arr.append(new_v)

print(int(arr[0]))


n=int(input())
v=list(map(int ,input().split()))
l=[]
draw_list=[]
second_draw=[]
for i in range(0,len(v)-1):
    first_combination=float((v[i]+v[i+1])/2)
    draw_list.append(first_combination)
    # print(draw_list)
for j in range(0,len(v)-1):
    second_combination=float((draw_list[j]+v[j])/2)
    second_draw.append(second_combination)
    # print(second_draw)

draw_list.extend(second_draw)
print(int(max(draw_list)))


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String str[] = br.readLine().split(" ");

		double v[] = new double[n];
		ArrayList<ArrayList<Double>> list = new ArrayList<ArrayList<Double>>();
		for (int i = 0; i < n; i++) {
			v[i] = Double.parseDouble(str[i]);
		}

		Arrays.sort(v);
		double d = v[0];
		for (int i = 0; i < n; i++) {
			d = (d + v[i]) / 2;
		}
		System.out.println(d);
	}

	static double get(double d[]) {
		if (d.length == 2)
			return (d[0] + d[1]) / 2;
		double dou1[] = new double[d.length / 2];
		double dou2[];
		if (d.length % 3 == 0)
			dou2 = new double[(d.length / 2)];
		else {
			dou2 = new double[(d.length / 2) + 1];
		}
		for (int i = 0; i < d.length / 2; i++) {
			dou1[i] = d[i];
			if (d.length % 3 == 0)
				dou2[i] = d[i + (d.length / 2)];
			else {
				dou2[i] = d[i + ((d.length / 2) + 1)];
			}

		}
		return (get(dou1) + get(dou2)) / 2;
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.NoSuchElementException;

/** ★★テンプレート */
public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int N = sc.nextInt();

		int[] ary = new int[N];
		for (int i = 0; i < N; i++) {
			ary[i] = sc.nextInt();
		}

		Arrays.sort(ary);
		double ans = 0;
		for (int i = N-1; i >= 0; i--) {
			int n;
			if(i == 0) {
				n = N-1;
			}else {
				n = N-i;
			}
			ans += (double)ary[i]/Math.pow(2, n);
		}

//
//		Pair[] a = { new Pair(0, 5), new Pair(1, 10), new Pair(2, 3) };
//		Arrays.sort(a, new Comparator<Pair>() {
//			public int compare(Pair o1, Pair o2) {
//				return Integer.compare(o1.v, o2.v); //Java7以降
//			}
//		});

		//************************************/
		// ここから出力処理
		//************************************/
		PrintWriter out = new PrintWriter(System.out);

		out.println(ans);

		// 最後に必ずFlush
		out.flush();
	}
}

//public class Main {
//	final static int SSSSS = 1000000;
//
//
//	public static void main(String[] args) {
//		FastScanner sc = new FastScanner();
//		int N = sc.nextInt();
//		int K = sc.nextInt();
//
//		double ans = 0;
//		int min = Main.calc(K);
//		int count = 1;
//
//
//		if(K <= N) {
//
//			for(int i=2; i<=K-1; i++) {
//
//				 count += min / Main.calc((int)Math.ceil((double)K / i));
//
//			}
////			//deb
////			out.println(count);
//
//			ans = (double)(count+(N-K+1)*min)/(N * min);
//
//		}else {
//			for(int i=2; i<=N; i++) {
////				//deb
////				out.println("count:");
////				out.println(count);
////				out.println("ceil:");
////				out.println(((int)Math.ceil(K / i)));
////				out.println("calc:");
////				out.println(Main.calc((int)Math.ceil(K / i)));
////				out.println("min / calc:");
////				out.println(min / Main.calc((int)Math.ceil(K / i)));
////				out.flush();
////				//
//
//
//				 count += min / Main.calc((int)Math.ceil((double)K / i));
//			}
//
//			ans = (double)count/(N * min);
//		}
//
//
//
//		//************************************/
//		// ここから出力処理
//		//************************************/
//		PrintWriter out = new PrintWriter(System.out);
//
//		out.println(ans);
//
//		// 最後に必ずFlush
//		out.flush();
//	}
//
//
//	/**
//	 * xが2のべき乗かどうか調べる関数
//	 * @param x
//	 * @return 2のべき乗ならtrue。0はfalse。
//	 */
//	static boolean isPowerOfTwo(int x){
//	    return x > 0 && (x & (x - 1)) == 0;
//	}
//
//	static int calc(int num) {
//	    if(isPowerOfTwo(num)){
//	    	return num;
//	    }
//
//		int ret = 0;
//		for(int shift=2; shift<31; shift++){ // 32bit符号付整数なので30回シフト=2^31が限界
//			ret = 1 << shift;                // 1を左シフトして2のべき乗を生成
//			if(ret > num){
//				return  ret;
//			}
//		}
//		return ret;
//	}
//
//
//}

///** ★★テンプレート */
//public class Main {
//	public static void main(String[] args) {
//		FastScanner sc = new FastScanner();
//		int N = sc.nextInt();
//		int M = sc.nextInt();
//
//		int[] ary = new int[N];
//		for (int i = 0; i < N; i++) {
//			ary[i] = sc.nextInt();
//		}
////
////		Pair[] a = { new Pair(0, 5), new Pair(1, 10), new Pair(2, 3) };
////		Arrays.sort(a, new Comparator<Pair>() {
////			public int compare(Pair o1, Pair o2) {
////				return Integer.compare(o1.v, o2.v); //Java7以降
////			}
////		});
//
//		//************************************/
//		// ここから出力処理
//		//************************************/
//		PrintWriter out = new PrintWriter(System.out);
//
//		out.println("hoge");
//
//		// 最後に必ずFlush
//		out.flush();
//	}
//}

/** スキャン用 */
class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	/** クラス内部用だよ */
	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	/** クラス内部用だよ */
	private int readByte() {
		if (hasNextByte()) {
			return buffer[ptr++];
		} else {
			return -1;
		}
	}

	/**
	 * クラス内部用だよ
	 * ASCII の文字の内、表示用の文字を返す関数
	 *
	 * @return 改行とか制御文字じゃない、表示用文字ならtrue
	 * */
	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	/**
	 * @return 改行文字とか空白以外を除いた、次の文字があればtrue
	 * */
	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
			ptr++;
		}
		return hasNextByte();
	}

	/**
	 *
	 * @return 次の文字列
	 */
	public String next() {
		if (!hasNext()) {
			throw new NoSuchElementException();
		}

		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	/**
	 *
	 * @return 次のLong
	 */
	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	/**
	 *
	 * @return 次のInt
	 */
	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	/**
	 *
	 * @return 次のDouble
	 */
	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

class PairII {
	int k;
	int v;

	public PairII(int k, int v) {
		this.k = k;
		this.v = v;
	}
}

class PairSI {
	String k;
	int v;
	int num; // 出現順

	public PairSI(String k, int v, int num) {
		this.k = k;
		this.v = v;
		this.num = num;
	}
}

//class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {
//	/** serialVersionUID. */
//	private static final long serialVersionUID = 6411527075103472113L;
//
//	public Pair(final K key, final V value) {
//		super(key, value);
//	}
//}


import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int N = sc.nextInt();
		int[] v = new int[N];
		for (int i = 0; i < N; ++i) {
			v[i] = sc.nextInt();
		}
		Arrays.sort(v);

		double tempResult = 0.0d;
		double two = 2.0d;

		tempResult += (double)v[0];
		tempResult += (double)v[1];
		for (int i = 0; i < N - 2; ++i) {
			tempResult += two * v[i+2];
			two *= (double)2.0d;
		}

		double result = tempResult / two;

		System.out.println(result);

	}

	private static int kaijo(int x) {
		int result = 1;
		for(int i = 1; i <= x; ++i) result *= 2;
		return result;
	}

}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}


import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int[] v = new int[N];
            for (int i = 0; i < N; i++) {
                v[i] = in.nextInt();
            }

            Arrays.sort(v);

            double res = 0;
            for (int i = N - 1, div = 2; i >= 0; i--, div *= 2) {
                if (i == 0) {
                    div /= 2;
                }
                res += (double) v[i] / div;
            }

            System.out.println(res);
        }
    }
}


import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] v = new int[n];
        for(int i = 0 ; i < n ; i++ ){
            v[i] = sc.nextInt();
        }
        Arrays.sort(v);
        Double s = (v[0] + v[1]) / 2.0;
        for(int i = 2 ; i < n ; i++ ){
            s = (s + v[2]) / 2.0;
        }
        System.out.println(s);
    }
}


import java.util.*;
import java.io.*;
import java.text.*;

public class Main {
    //SOLUTION BEGIN
    //Into the Hardware Mode
    void pre() throws Exception{}
    void solve(int TC) throws Exception{
        int N = ni();
        double val = 0.0;
        long[] A = new long[N];
        for(int i = 0; i< N; i++)A[i] = nl();
        Arrays.sort(A);
        for(long l:A)val = (val+l)/2;
        pn(df.format(val));
    }
    //SOLUTION END
    void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
    void exit(boolean b){if(!b)System.exit(0);}
    static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}
    final long IINF = (long)2e18;
    final int INF = (int)1e9+2;
    DecimalFormat df = new DecimalFormat("0.00000000000");
    double PI = 3.141592653589793238462643383279502884197169399, eps = 1e-8;
    static boolean multipleTC = false, memory = true, fileIO = false;
    FastReader in;PrintWriter out;
    void run() throws Exception{
        long ct = System.currentTimeMillis();
        if (fileIO) {
            in = new FastReader("");
            out = new PrintWriter("");
        } else {
            in = new FastReader();
            out = new PrintWriter(System.out);
        }
        //Solution Credits: Taranpreet Singh
        int T = multipleTC? ni():1;
        pre();
        for (int t = 1; t <= T; t++) solve(t);
        out.flush();
        out.close();
        System.err.println(System.currentTimeMillis() - ct);
    }
    public static void main(String[] args) throws Exception{
        if(memory)new Thread(null, new Runnable() {public void run(){try{new Main().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
        else new Main().run();
    }
    int[][] make(int n, int e, int[] from, int[] to, boolean f){
        int[][] g = new int[n][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = to[i];
            if(f)g[to[i]][--cnt[to[i]]] = from[i];
        }
        return g;
    }
    int[][][] makeS(int n, int e, int[] from, int[] to, boolean f){
        int[][][] g = new int[n][][];int[]cnt = new int[n];
        for(int i = 0; i< e; i++){
            cnt[from[i]]++;
            if(f)cnt[to[i]]++;
        }
        for(int i = 0; i< n; i++)g[i] = new int[cnt[i]][];
        for(int i = 0; i< e; i++){
            g[from[i]][--cnt[from[i]]] = new int[]{to[i], i, 0};
            if(f)g[to[i]][--cnt[to[i]]] = new int[]{from[i], i, 1};
        }
        return g;
    }
    int find(int[] set, int u){return set[u] = (set[u] == u?u:find(set, set[u]));}
    int digit(long s){int ans = 0;while(s>0){s/=10;ans++;}return ans;}
    long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
    int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
    int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
    void p(Object... o){for(Object oo:o)out.print(oo+" ");}
    void pn(Object... o){for(Object oo:o)out.print(oo+" ");out.println();}
    void pni(Object... o){for(Object oo:o)out.print(oo+" ");out.println();out.flush();}
    String n()throws Exception{return in.next();}
    String nln()throws Exception{return in.nextLine();}
    int ni()throws Exception{return Integer.parseInt(in.next());}
    long nl()throws Exception{return Long.parseLong(in.next());}
    double nd()throws Exception{return Double.parseDouble(in.next());}

    class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

        String next() throws Exception{
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    throw new Exception(e.toString());
                }
            }
            return st.nextToken();
        }

        String nextLine() throws Exception{
            String str;
            try{
                str = br.readLine();
            }catch (IOException e){
                throw new Exception(e.toString());
            }
            return str;
        }
    }
}


#include<bits/stdc++.h>

using namespace std;

int a[55];

main(){
    int n;

    scanf("%d" , &n);

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

    double ans = a[0];
    for(int i = 1 ; i < n ; i ++){
        ans = (ans + 1.0*a[i]) / 2.0;
    }

    printf("%.9f\n" , ans);

    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0, max_i = (n); i < max_i; i++)
#define repi(i, a, b) for (long long i = (a), max_i = (b); i < max_i; i++)
using namespace std;
typedef long long ll;

int main() {
  int N; cin >> N;
  vector<int> v(N);
  rep(i,N) cin >> v[i];
  sort(v.begin(), v.end());
  double ans = v[0];
  repi(i,1,N) ans = (ans + v[i])/2;
  printf("%.10f\n", ans);
  return 0;
}


#include <vector>
#include <sstream>
#include <algorithm>
#include <fstream>
#include <list>
#include <map>
#include <istream>
#include <bitset>
#include <sstream>
#include <unordered_map>
#include <stack>
#include <set>
#include <cmath>
#include <random>
#include <iostream>
#include <bitset>
#include <iomanip>
#include <queue>
#include <string>

#define int long long
#define endl "\n"
#define all(x) x.begin(),x.end()
#define rr return 0
#define xx first
#define yy second
#define pii pair<int,int>

using namespace std;
typedef long long ll;
typedef long double ld;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i = 0;i < n;i++){
        cin >> a[i];
    }
    sort(all(a));
    double p = a[0];
    for(int i = 1;i < n;i++){
        p = (p + a[i]) / 2;
    }
    cout << fixed << setprecision(10) << p;
    rr;
}


#include<iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include<map>
#include<cstring>
#include<iomanip>
#include <string>
#include <vector>
#include<unordered_map>
#include<unordered_set>
using namespace std;

typedef long long unsigned llu;
typedef long double ld;
#define ll long long
#define PI 3.14159265358979323846
#define For(i, a, b) for (int i = a, sz = (int)b; i < sz; i++)
#define rFor(i, a, b, c) for (int i = (a); i >= (b); i -= (c))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fill(a, b) memset(a, b, sizeof(a))
#define IO ios_base::sync_with_stdio(false), cin.tie(0),cout.tie(0)
const int mod = 1000000007;
const ll inf = 1000000000009;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) { return a*b/gcd(a,b);}

//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdoutn

int main()
{
	IO;
	int n{};double res,ans{},cnt{};
	cin>>n;
	vector<double>v(n);
	For(i,0,n)cin>>v[i];
	For(i,0,n)//500 300 200 100
	{
		//500
		For(j,i+1,n)
		{
			// 300 // 200
			res=(v[i]+v[j])/2.0;
			For(k,0,n)
			{

				if(k!=i && k!=j){
					res=(res+v[k])/2.0;
				}
			}
				ans=max(res,ans);

		}
	}
	(!ans)?cout<<fixed<<setprecision(1)<<res<<'\n':cout<<fixed<<setprecision(1)<<ans<<'\n';
	//system("pause");
	return 0;
}


#include<iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include<map>
#include<cstring>
#include<iomanip>
#include <string>
#include <vector>
#include<unordered_map>
#include<unordered_set>
using namespace std;

typedef long long unsigned llu;
typedef long double ld;
#define ll long long
#define PI 3.14159265358979323846
#define For(i, a, b) for (int i = a, sz = (int)b; i < sz; i++)
#define rFor(i, a, b, c) for (int i = (a); i >= (b); i -= (c))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fill(a, b) memset(a, b, sizeof(a))
#define IO ios_base::sync_with_stdio(false), cin.tie(0),cout.tie(0)
const int mod = 1000000007;
const ll inf = 1000000000009;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) { return a*b/gcd(a,b);}

//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdoutn

int main()
{
	IO;
	int n{};double res,ans{},cnt{};
	cin>>n;
	vector<double>v(n);
	For(i,0,n)cin>>v[i];
	For(i,0,n)//500 300 200 100
	{
		//500
		For(j,i+1,n)
		{
			// 300 // 200
			res=(v[i]+v[j])/2.0;
			For(k,0,n)
			{

				if(k!=i && k!=j){
					cnt=(res+v[k])/2.0;
					ans=max(cnt,ans);
				}
			}
		}
	}
	(!ans)?cout<<fixed<<setprecision(1)<<res<<'\n':cout<<fixed<<setprecision(1)<<ans<<'\n';
	//system("pause");
	return 0;
}


#include<iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include<map>
#include<cstring>
#include<iomanip>
#include <string>
#include <vector>
#include<unordered_map>
#include<unordered_set>
using namespace std;

typedef long long unsigned llu;
typedef long double ld;
#define ll long long
#define PI 3.14159265358979323846
#define For(i, a, b) for (int i = a, sz = (int)b; i < sz; i++)
#define rFor(i, a, b, c) for (int i = (a); i >= (b); i -= (c))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fill(a, b) memset(a, b, sizeof(a))
#define IO ios_base::sync_with_stdio(false), cin.tie(0),cout.tie(0)
const int mod = 1000000007;
const ll inf = 1000000000009;
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) { return a*b/gcd(a,b);}

//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdoutn

int main()
{
	IO;
	int n{};double res,ans{},cnt{};
	cin>>n;
	vector<double>v(n);
	For(i,0,n)cin>>v[i];
	For(i,0,n)//500 300 200 100
	{
		//500
		For(j,i+1,n)
		{
			// 300 // 200
			res=(v[i]+v[j])/2;
			For(k,0,n)
			{

				if(k!=i && k!=j){
					cnt=(res+v[k])/2.0;
					ans=max(cnt,ans);
				}
			}
		}
	}
	(!ans)?cout<<fixed<<setprecision(1)<<res<<'\n':cout<<fixed<<setprecision(1)<<ans<<'\n';
	//system("pause");
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <ctype.h>
#include <string.h>

int f(const void *a, const void *b)
{
	return(*(int *)a - *(int *)b);
}
int main(void)
{
	int n;
	scanf("%d",&n);
	int *v;
	v = (int *)malloc(sizeof(int)*(n));
	double *a;
	a = (double *)malloc(sizeof(double)*(n));
	int i = 0;
	while (i < n)
	{
		scanf("%d",&v[i]);
		i++;
	}
	qsort(v,n,sizeof(int),f);
	i = 0;
	while (i < n)
	{
		a[i] = (double)v[i];
		i++;
	}
	i = 1;
	while (i < n)
	{
		a[i] = (a[i] + a[i-1])/2.0;
		i++;
	}
	printf("%.12f\n",a[n-1]);
	return(0);
}


#include <stdio.h>

int main(){
  long n,v[1005],i,j,k,m,f=1;
  scanf("%ld",&n);
  for(i=0;i<n;i++){
    scanf("%ld",&v[i]);
    v[i]<<=(n-1);
  }
  while(f==1){
    f=0;
    for(i=0;i<n-1;i++){
      if(v[i]<v[i+1]){
        k=v[i];
        v[i]=v[i+1];
        v[i+1]=k;
        f=1;
      }
    }
  }
  for(i=n-1;i>0;i--){
    v[i-1]+=v[i];
    v[i-1]>>=1;
  }
  printf("%ld.",v[0]>>(n-1));
  v[0]&=((long)1<<(n-1))-1;
  for(i=0;i<=6;i++){
    v[0]*=10;
    printf("%ld",v[0]>>(n-1));
    v[0]&=((long)1<<(n-1))-1;
  }
  return(0);
}


#include<stdio.h>
#include<stdlib.h>
#include<math.h>
/*double sort(const double *a,const double *b){
return *b-*a;
}*/
int main(void){
  int n;
  scanf("%d",&n);
  double a[n];
  for(int i=0;i<n;i++){
	scanf("%lf",&a[i]);
  }
  //qsort(a,n,sizeof(a[0]),sort);
   for(int i=0;i<n-1;i++){
	for(int j=i+1;j<n;j++){
	if(a[i]<a[j]){
      double w=a[i];
      a[i]=a[j];
      a[j]=w;
  }
    }}
double sum=0;
  for(int i=0;i<n-1;i++){
    //printf("%lf\n",a[i]/pow(2,i+1));
	sum+=a[i]/pow(2,i+1);
  }
  sum+=a[n-1]/pow(2,n-1);
  printf("%lf",sum);
  return 0;
}


#include <stdio.h>
#include <stdlib.h>
int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}

int main(void){
  int n;
  float v[1005];

  scanf("%d", &n);
  for(int i=0;i<n;i++){
    scanf("%f", &v[i]);
  }
   qsort(v, n, sizeof(int), compare_int);
  for(int i=0;i<n-1;i++){
    int x = v[i];
    int y= v[i+1];
    v[i+1]= (x+y)/2;
  }
  printf("%f", v[n-1]);
  return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int n,u[50];
	int i,j;
	double x=0;
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&u[i]);
	sort(u,u+n);
	x=u[0];
	for(i=0;i<n-1;i++){
		x=(double)((x+u[i+1])/2);
	}
	printf("%lf\n",x);
	return 0;
}


#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    double M = -1e9, tmp, count [n+10];
    int arr[n+10], i, j=0;
    for (i=0; i<n; i++)
        scanf("%d", &arr[i]);

    tmp = arr [n-1];
    for (i=n-2; i>=0; i--){
        tmp += arr[i];
        tmp /= 2;
        count [j] = tmp;
        j++;
    }
    for (i=0; i<j; i++){
        if (M <= count[i])
            M = count [i];
    }
    printf("%.1lf\n", M);
    return 0;
}


"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
const args_lines = arg_str.split('\n')
const n = args_lines[0]
const v_array = args_lines[1].split(' ')

const v_array_num = v_array.map(x=>parseInt(x))
const v_array_num_sort = v_array_num.sort((a,b)=>(a-b))

const result = v_array_num_sort.reduce((a,b)=>((a+b)/2))

console.log(result)


"use strict"

function Main(input) {
    const N = parseInt(input[0], 10);
    const V = input.slice(1).map(v => parseInt(v, 10));

    const sortedV = V.sort((a, b) => a - b);
    let result = 0;

    for (let i = 0; i < N - 1; i++) {
        if (i === 0) {
            result = (sortedV[i] + sortedV[i + 1]) / 2;
        } else {
            result = (result + sortedV[i + 1]) / 2;
        }
    }

    console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));


function Main(input) {
  "use strict"
  const temp = input.split("\n")

	const n = parseInt(temp.shift());
  const vn = temp.shift().split(" ").map(e => parseInt(e));
  vn.sort((a,b) => b - a);

  let value = 0;
  for(let i = 0; i < n; i++){
    if(i !== n - 1) value += vn[i] / Math.pow(2, i + 1)
    else value += vn[i] / Math.pow(2, i)
  }
  console.log(value)
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
	var data = input.split("\n");
	var kazu = parseInt(data[0],10);
	var n =  data[1].split(" ").map((n) => parseInt(n, 10));

	n.sort(function(a, b) {
		return a-b;
	});

	var tmp = 0;

	for(var i=0;i < kazu -1; i++){
		tmp = (n[0]+n[1])/2;
		n.shift();
		n[0] = tmp;
		console.log(n)
	}
	console.log(n[0])
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
	var data = input.split("\n");
	var n =  data[1].split(" ").map((n) => parseInt(n, 10));
	n = n.sort();
	var tmp = 0;

	for(var i=0;i < parseInt(data[0])-1; i++){
		tmp = (n[0]+n[1])/2
		n.shift();
		n[0] = tmp;
	}
	console.log(n[0])
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
	var data = input.split("\n");
	var n =  data[1].split(" ").map((n) => parseInt(n, 10));
	n = n.sort();
	console.log(n)
	var tmp = 0;

	for(var i=0;i < parseInt(data[0])-1; i++){
		tmp = (n[0]+n[1])/2
		n.shift();
		n[0] = tmp;
	}
	console.log(n[0])
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import (
	"fmt"
	"sort"
)

func main() {
	var n int
	fmt.Scan(&n)

	vs := make([]float64, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&vs[i])
	}

	sort.Float64s(vs)
	cur := vs[0]
	for i := 1 ; i < n; i++ {
		cur = (cur +vs[i])/2.0
	}
	fmt.Println(cur)

}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
)

func main() {
	var wtr = bufio.NewWriter(os.Stdout)
	var N int
	fmt.Scan(&N)
	v := make([]float64, N)
	for i := 0; i < N; i++ {
		fmt.Scan(&v[i])
	}
	sort.Float64s(v)
	for i := 0; i < N-1; i++ {
		v[i+1] = (v[i] + v[i+1]) / 2.0
	}
	fmt.Fprintln(wtr, v[N-1])

	_ = wtr.Flush()
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	// i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	sc.Split(bufio.ScanWords)
	n := nextInt()

	x := []float64{}

	for i := 0; i < n; i++ {
		x = append(x, float64(nextInt()))
	}

	sort.Float64s(x)

	ave := (x[0] + x[1]) / 2
	for i := 2; i < len(x); i++ {
		ave = (ave + x[i]) / 2
	}

	fmt.Println(ave)
}


#include <iostream>
#include <iomanip>
#include <queue>
#include <vector>

int main() {
    int n;

    std::priority_queue<double, std::vector<double>, std::greater<double> > q;

    std::cin >> n;
    for (int i = 0; i < n; i++) {
        int v;
        std::cin >> v;
        q.push((double) v);
    }

    while (q.size() > 1) {
        double a, b;
        a = q.top();
        q.pop();
        b = q.top();
        q.pop();

        q.push((a + b) / 2);
    }

    double r = q.top();
    std::cout << std::setprecision(5) << r << std::endl;
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
)

func main() {
	N := getStdinInt()
	v := getStdinIntArr()
	vf := make([]float64, N)
	for i := 0; i < N; i++ {
		vf[i] = (float64)(v[i])
	}

	sort.Slice(vf, func(i, j int) bool { return vf[i] < vf[j] })

	for {
		vftmp := make([]float64, 0)

		for i := 0; i+1 < len(vf); i += 2 {
			vftmp = append(vftmp,
				(float64)(vf[i]+vf[i+1])/2.0)
		}
		if len(vf)%2 == 1 {
			vftmp = append(vftmp, vf[len(vf)-1])
		}

		vf = vftmp
		if len(vftmp) <= 1 {
			break
		}
	}

	fmt.Printf("%f\n", vf[0])
}

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinInt2() (int, int) {
	list := getStdinIntArr()
	return list[0], list[1]
}
func getStdinInt3() (int, int, int) {
	list := getStdinIntArr()
	return list[0], list[1], list[2]
}
func getStdinInt64() int64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return rtn
}
func getStdinIntU64() uint64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return uint64(rtn)
}
func getStdinInt64_2() (int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1]
}
func getStdinInt64_3() (int64, int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1], list[2]
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}
func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}
func getStdinIntArrU64() []uint64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]uint64, len(list))
	for idx, val := range list {
		r, _ := strconv.ParseInt(val, 10, 64)
		rtn[idx] = uint64(r)
	}
	return rtn
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}
func max64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}
func abs(n int) int {
	if n < 0 {
		return -n
	}
	return n
}
func abs64(n int64) int64 {
	if n < 0 {
		return -n
	}
	return n
}
func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, _ := sc.ReadLine()
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}


package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024*1024), bufio.MaxScanTokenSize)
}

//func nextString() string {
//	sc.Scan()
//	return sc.Text()
//}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var N int
var ANS float64
var L []int
func main() {
	N = nextInt()
	L = make([]int, N)
	for i := 0; i < N; i++ {
		L[i] = nextInt()
	}
	l := make([]int, N)
	dp(l, 0)
	fmt.Println(ANS)
}

func dp(l []int, depth int) {
	if depth == N {
		if uniq(l) {
			ans := float64(L[l[0]])
			for i := 1; i < N; i++ {
				ans = (ans + float64(L[l[i]])) / float64(2)
			}
			ANS = max(ANS, ans)
		}
		return
	}
	depth++
	for i := 0; i < N; i++ {
		l[depth - 1] = i
		dp(l, depth)
	}
}
func uniq(l []int) bool {
	for i := 0; i < N - 1; i++ {
		for j := i + 1; j < N; j++ {
			if l[i] == l[j] {
				return false
			}
		}
	}
	return true
}

func max(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}


n = gets.chomp.to_i
v = gets.chomp.split(' ').map(&:to_f).sort

(n-1).times do
  a = v.shift
  b = v.shift
  v.unshift((a+b)/2)
end

print(v[0])


# ABC 138 C
# https://atcoder.jp/contests/abc138/tasks/abc138_c

n = gets.to_i
v = gets.split(/ /).map(&:to_i)

class Item
  def initialize(value, i)
    @value = value
    @i = i
  end

  attr_reader :value, :i

  def composed_value(n)
    j = i == 0 ? n - 1 : n - i
    value * 1.0 / (2 ** j)
  end
end

composed_values = v.sort.map.with_index(0) { |value, i| Item.new(value, i).composed_value(n) }
# puts composed_values
puts composed_values.reduce(0) { |acc, i| acc + i }


n = gets.to_i
v = gets.split.map(&:to_i)
v.sort!
sum = v[0]
(1...n).each do |i|
  sum = (sum + v[i]) / 2.0
end
puts sum


  n = gets.to_i; break if n.zero?
  arr = gets.split(' ').map(&:to_f).sort#; break if arr.empty?
  e = arr.shift

  (n-1).times do
    e = (e + arr.shift) / 2.0
  end

  puts e


gets
p gets.split.map{|i|i.to_i*100}.sort.inject{|r,i| (r+i)/2}/100


n,*v=`dd`.split.map(&:to_r).sort
p v.inject{|r,i|(r+i)/2}.to_f


use std::io::stdin;

fn main() {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.clear();

    stdin().read_line(&mut buf).unwrap();
    let iter = buf.trim().split_whitespace();
    let values: Vec<i32> = iter.map(|str| str.parse::<i32>().unwrap()).collect();

    println!("{}", solve(values));
}

fn solve(mut values: Vec<i32>) -> f64{
    values.sort();
    let mut result = values[0] as f64;
    for index in 1..values.len(){
        result = (result + values[index] as f64) / 2.0;
    }
    result
}


use std::collections::VecDeque;

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|s| s.parse().ok().unwrap())
        .collect()
}

fn main() {
    let _n = read::<usize>();
    let mut vs = read_vec::<usize>();
    vs.sort();
    let vs = vs.iter().map(|&x| x as f64).collect::<Vec<_>>();

    let mut deque = VecDeque::from(vs);

    while deque.len() > 1 {
        if let (Some(a), Some(b)) = (deque.pop_front(), deque.pop_front()) {
            deque.push_front((a + b) / 2.0);
        }
    }

    let ans = deque.pop_front().unwrap();
    println!("{}", ans);
}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {

        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    /*     input! {
        n: usize,
        mut plan: [(i32, i32, i32); n],  // Vec<(i32, i32, i32)>
    }
 */
    input! {
        n:usize,
        vs:[usize;n],
    }

    let mut vs = vs;
    vs.sort();
    let ans = vs.iter().fold(0.0,|acc,cur|{
        if acc == 0.0 {
            return *cur as f32;
        }else{
            return (acc + *cur as f32) / 2.0;
        }
    });
    println!("{}",ans);

}


use proconio::{fastout, input};
use std::cmp::Ordering;

#[fastout]
fn main() {
    input! {n: usize, v: [f64; n]};

    let mut v: Vec<f64> = v;
    v.sort_by(cmp_f64);

    while v.len() > 1 {
        let m1 = v.pop().unwrap();
        let m2 = v.pop().unwrap();
        v.push((m1 + m2) / 2.0);
        v.sort_by(cmp_f64);
    }

    println!("{}", v[0]);
}

fn cmp_f64(a: &f64, b: &f64) -> Ordering {
    if a < b {
        return Ordering::Less;
    } else if a > b {
        return Ordering::Greater;
    }
    return Ordering::Equal;
}


use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {n: usize, v: [usize; n]};

    let mut v: Vec<usize> = v;
    v.sort();

    while v.len() > 1 {
        let m1 = v.pop().unwrap();
        let m2 = v.pop().unwrap();
        v.push((m1 + m2) / 2);
        v.sort();
    }

    println!("{}", v[0]);
}


use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let n: usize = iterator.next().unwrap().parse().unwrap();
    let mut values: Vec<usize> = Vec::with_capacity(n);
    for _i in 0..n {
        values.push(iterator.next().unwrap().parse().unwrap());
    }

    let perms = make(n);
    let mut max: f64 = 0.0;
    for perm in perms {
        let mut sum: f64 = values[perm[0] - 1] as f64;
        for p in 1..perm.len() {
            sum = (sum + values[perm[p] - 1] as f64) / 2.0;
        }
        if sum > max {
            max = sum;
        }
    }

    return format!("{:.10}", max);
}

fn make(n: usize) -> Vec<Vec<usize>> {
    let mut original = Vec::new();
    for i in 1..(n + 1) {
        original.push(i)
    }

    let mut result = Vec::new();
    _make(original, Vec::new(), &mut result);
    return result;
}

fn _make(candidate: Vec<usize>, perm: Vec<usize>, result: &mut Vec<Vec<usize>>) {
    if candidate.is_empty() {
        result.push(perm);
        return;
    }

    for i in 0..candidate.len() {
        let mut c = candidate.clone();
        let mut p = perm.clone();
        p.push(c.remove(i));
        _make(c, p, result);
    }
}


let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

let sorte = array.sort()
let reduced = sorte.dropFirst().reduce(sorte[0]) { ($0 + $1)/2.0 }

print(reduced)


var n=Int(readLine()!)!
var arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var i = 0
var d : Double = 0

arr = arr.sort()
//print( arr )

d = ( ( Double(arr[0]) + Double(arr[1]) ) / 2 )
//print( d )
for i in 2..<n {
  d = ( ( d + Double(arr[i]) ) / 2)
}

print( d )


import Foundation
import CoreFoundation

#if swift(>=4.0)
prefix operator *
infix operator **: PowerPrecedence
precedencegroup PowerPrecedence {
    higherThan: MultiplicationPrecedence
    lowerThan: BitwiseShiftPrecedence
    associativity: right
}
#else
extension String {
    func split(separator separator: Character) -> [String] {
        return self.characters.split(separator).map{String($0)}
    }
    var count: Int {
        return self.characters.count
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
    func reversed() -> ReverseCollection<String.CharacterView> {
        return self.characters.reverse()
    }
    func forEach(body: (Character) -> Void) {
        return self.characters.forEach{body($0)}
    }
    func map<T>(transform: (Character) -> T) -> [T] {
        return self.characters.map{transform($0)}
    }
    func reduce<Result>(initialResult: Result, _ nextPartialResult: (Result, Character) -> Result) -> Result {
        return self.characters.reduce(initialResult){nextPartialResult($0, $1)}
    }
    func filter(isIncluded: (Character) -> Bool) -> String {
        return String(self.characters.filter{isIncluded($0)})
    }
    func enumerated() -> EnumerateSequence<String.CharacterView> {
        return self.characters.enumerate()
    }
}
extension Array where Element: Comparable {
    func max() -> Element? {
        return self.maxElement()
    }
    func min() -> Element? {
        return self.minElement()
    }
    func sorted(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) -> [Element] {
        return self.sort(areInIncreasingOrder)
    }
    mutating func sort(by areInIncreasingOrder: (Element, Element) -> Bool = {$0 < $1}) {
        self.sortInPlace(areInIncreasingOrder)
    }
}
extension Array {
    mutating func swapAt(i: Int, _ j: Int) {
        swap(&self[i], &self[j])
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func reverse() {
        self = self.reversed()
    }
    func enumerated() -> EnumerateSequence<[Element]> {
        return self.enumerate()
    }
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
extension _ArrayType where Generator.Element == String {
    func joined(separator separator: String = "") -> String {
        return self.joinWithSeparator(separator)
    }
}
extension Range {
    func reversed() -> [Element] {
        return self.reverse()
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
prefix operator * { }
infix operator ** {
    precedence 155      // 乗除算より強く，ビットシフトより弱い
    associativity right // 右結合
}
#endif
prefix func * <T> (a: [T]) -> (T, T)             { return (a[0], a[1]) }
prefix func * <T> (a: [T]) -> (T, T, T)          { return (a[0], a[1], a[2]) }
prefix func * <T> (a: [T]) -> (T, T, T, T)       { return (a[0], a[1], a[2], a[3]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T)    { return (a[0], a[1], a[2], a[3], a[4]) }
prefix func * <T> (a: [T]) -> (T, T, T, T, T, T) { return (a[0], a[1], a[2], a[3], a[4], a[5]) }
func **(lhs: Int, rhs: Int) -> Int {
    return Int(pow(Double(lhs), Double(rhs)))
}
func **(lhs: Int, rhs: Double) -> Double {
    return pow(Double(lhs), rhs)
}
func * <Element> (lhs: [Element], rhs: Int) -> [Element] {
    return (0..<rhs).reduce([]){a,_ in a+lhs}
}
func *(lhs: String, rhs: Int) -> String {
    return (0..<rhs).reduce(""){s,_ in s+lhs}
}
let MOD = 10 ** 9 + 7
let alphabets = "abcdefghijklmnopqrstuvwxyz"
let ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
protocol Container {
    associatedtype Item
    mutating func append(item: Item)
    var count: Int { get }
    subscript(i: Int) -> Item { get }
}
struct Stack<Element>: Container {
    var items = [Element]()
    mutating func push(item: Element) {
        items.append(item)
    }
    mutating func pop() -> Element {
        return items.removeLast()
    }
    mutating func append(item: Element) {
        self.push(item)
    }
    var count: Int {
        return items.count
    }
    subscript(i: Int) -> Element {
        return items[i]
    }
}
struct Queue<Element>: Container {
    var items = [Element]()
    mutating func push(item: Element) {
        items.append(item)
    }
    mutating func pop() -> Element {
        return items.removeFirst()
    }
    mutating func append(item: Element) {
        self.push(item)
    }
    var count: Int {
        return items.count
    }
    subscript(i: Int) -> Element {
        return items[i]
    }
}
struct Heap<Element: Comparable>: Container {
    var items = [Element]()
    mutating func push(item: Element) {
        var i = items.count
        while i > 0 {
            let p = (i - 1) / 2
            if items[p] <= item {
                break
            }
            if i == items.count {
                items.append(items[p])
            } else {
                items[i] = items[p]
            }
            i = p
        }
        if i == items.count {
            items.append(item)
        } else {
            items[i] = item
        }
    }
    mutating func pop() -> Element {
        let ret = items[0]
        let x = items[items.count - 1]
        var i: Int = 0
        while i * 2 + 1 < items.count - 1 {
            var a = i * 2 + 1
            let b = i * 2 + 2
            if b < items.count - 1 && items[b] < items[a] {
                a = b
            }
            if items[a] >= x {
                break
            }
            items[i] = items[a]
            i = a
        }
        items[i] = x
        _ = items.removeLast()
        return ret
    }
    mutating func append(item: Element) {
        self.push(item)
    }
    var count: Int {
        return items.count
    }
    subscript(i: Int) -> Element {
        return items[i]
    }
}
extension Array where Element: Equatable {
    func count(of value: Element) -> Int {
        return self.reduce(0){$0+($1==value ? 1 : 0)}
    }
}
extension String {
    func count(of value: Character) -> Int {
        return self.reduce(0){$0+($1==value ? 1 : 0)}
    }
    subscript(i: Int) -> Character {
        return self.map{$0}[i]
    }
}
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringsSplit(by separator: Character = " ") -> [String] {
    return readLine()!.split(separator: separator).map{String($0)}
}
func readIntsSplit(by separator: Character = " ") -> [Int] {
    return readLine()!.split(separator: separator).map{Int($0)!}
}
func gcd(x: Int, _ y: Int) -> Int {
    return y>0 ? gcd(y, x%y) : x
}
func lcm(x: Int, _ y: Int) -> Int {
    return x * y / gcd(x, y)
}
func manhattanDistance(x1: Int, _ y1: Int, _ x2: Int, _ y2: Int) -> Int {
    return abs(x1 - x2) + abs(y1 - y2)
}
func euclideanDistance(x1: Int, _ y1: Int, _ x2: Int, _ y2: Int) -> Double {
    return sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
}

/*************** テストスペース ***************/

//arr.sort{$0.0==$1.0 ? $0.1<$1.1 : $0.0<$1.0}  // タプル配列のソート

/*************** メインプログラム ***************/

let N = readInt()!
var v = readIntsSplit().sorted().map{Double($0)}
var first = v.removeFirst()
print(v.reduce(first){($0+$1)/2})


let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

array.sort()
let reduced = array.dropFirst().reduce(array[0]) { ($0 + $1)/2.0 }

print(reduced)


let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

var sorte = array.sorted()
let reduced = sorte.reduce(array[0]) { ($0 + $1)/2.0 }

print(reduced)


let n = Int(readLine()!)!
var array = readLine()!.characters.split{$0 == " "}.map{ Double(String($0))! }

var sorted = array.sorted()
let reduced = sorted.reduce(array[0]) { ($0 + $1)/2.0 }

print(reduced)


const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a):any[]=>{return Array.from(new Set(a))};
const main=()=>{
  let n=tn()
  let ar=asc(tnn(n))
  let ans=ar[0]
  for(let i=1;i<n;i++){
    ans=(ans+ar[i])/2
  }
  to(ans)
}
main()


function main (input) {
	input = input.trim().split('\n');
  	const n = Number(input[0]);
  	const vs = input[1].split(' ').map(n => Number(n));
  	vs.sort(((a, b) => a  - b);
  	let result = (vs[0] + vs[1])/2;
  	for (let i = 2; i < vs.length; i++) {
      const v = vs[i];
      result = (result + v)/2;
    }
  	console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from 'fs'
const reader = (s: string) => s.split('\n') // .map(t => parseInt(t, 10))

function Main(input: string) {
  const N = parseInt(reader(input)[0], 10)
  const v = reader(input)[1]
    .split(' ')
    .map(x => parseInt(x, 10))
    .sort((a, b) => a - b)

  let ans = v[0]
  for (let i = 1; i <= N - 1; i++) {
    ans = (ans + v[i]) / 2
  }

  console.log(ans)
}

Main(fs.readFileSync('/dev/stdin', 'utf8'))


'use strict'
function main(input: string) {
    const n: number = Number(input.split('\n')[0]);
    const u: number[] = input.split('\n')[1].split(' ').map(Number).sort();
    const r = u.reduce((acc, cur) => (acc + cur) / 2);
    console.log(r);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


// general helpers
const debug = (message?: any, ...optionalParams: any[]) => {
  if (process.env.LOCAL_DEBUG === '1') console.log(message, ...optionalParams)
}

// helpers
const parseLines = (
  lines: string[]
): { N: number, v: number[] } => {
  const N = +lines[0]
  const v = lines[1].split(' ').map(line => +line)
  const obj = { N, v }
  debug(obj)
  return obj
}
// solver
export const solve = (lines: string[]): string => {
  const { N, v } = parseLines(lines)
  v.reverse()
  const first = v.shift() || 0
  const result = v.reduce((prev, current) => (prev + current) / 2, first)
  return `${result}`
}

// main
const main = (lines: string[]) => {
  console.log(solve(lines))
}

// exec main function for submit
if (process.env.LOCAL_DEBUG !== '1') {
  const { stdin: input, stdout: output } = process
  input.resume()
  input.setEncoding('utf8')
  const lines: string[] = []
  require('readline')
    .createInterface({ input, output })
    .on('line', (line: string) => lines.push(line))
    .on('close', () => main(lines))
}


function Main(input: string) {
  // 1行目がinput[0], 2行目がinput[1], …に入る
  const args = input.split("\n");
  // const N: number = parseInt(args[0], 10);
  const A: number[] = args[1].split(" ").map(s => parseInt(s, 10));

  const hoge = (A: number[]) => {
    const N = A.length;
    if (N == 2) {
      console.log((A[0] + A[1]) / 2);
      return;
    }

    let min = 1000;
    let i1 = -1;
    let i2 = -1;

    for (let i = 0; i < N - 1; i++) {
      for (let j = i + 1; j < N; j++) {
        const result = Math.abs(A[i] - A[j]);
        if (result < min) {
          min = result;
          i1 = i;
          i2 = j;
        }
      }
    }

    const n1 = A[i1];
    const n2 = A[i2];
    const newV = (n1 + n2) / 2;
    A[i1] = newV;
    // const newA = A.filter(n => n !== n2);
    A.pop();
    hoge(A);
  };

  hoge(A);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
//Main(require("fs").readFileSync("./input", "utf8"));
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


A, B, K = list(map(int, input().split()))

if A >= K:
  A -= K
else:
  K -= A
  A = 0
  B = max(0, B - K)
print(A, B)


#ABC-B
a,b,k=map(int,input().split())
if a>=k:
    print(a-k,b,sep=' ')
else:
    if b>=k-a:
        print(0,b-k+a,sep=' ')
    else:
        print(0,0,sep=' ')


A, B, K = map(int,input().split())

A -= K
if(A < 0):
    B -= abs(A)
    A = 0
    if(B < 0):
        B = 0

print(str(A) + " " + str(B))


a, b, k = map(int, input().split())

aa = max (a - k, 0)
bb = max (a + b - k, 0)
print(f'{aa} {bb}')


a, b, k = map(int, input().split())

a -= k
if a < 0:
    b += a
    a = 0
print(f'{a} {b}')


a, b, k = map(int, input().split())
if a > 0 and a < k:
  a = 0
  K = k - a
  if b > 0 and b > K:
    b = b - K
  elif b > 0 and K >= b:
    b = 0
elif a > 0 and a >= k:
  a = a - k
  exit()
else:
  if b > 0 and b > k:
    b = b - k
  elif b > 0 and k >= b:
    b = 0
print(a, b)


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {

		FastScanner sc = new FastScanner();
		long A = sc.nextLong();
		long B = sc.nextLong();
		long K = sc.nextLong();

		if(A+B<=K)
			System.out.println("0 0");
		else if  (A >= K)
			System.out.println( (A - K) + " " + B);
		else if (A < K)
			System.out.println("0 " + (B - K + A));
	}

	//以下、自作ライブラリ

	//最大公約数
	public static long gcd(long a, long b) {
		if (a < b)
			return gcd(b, a);
		long c = 0;
		c = a % b;
		if (c == 0)
			return b;
		return gcd(b, c);
	}

	//最小公倍数
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}

	//素数判定
	public static boolean isPrime(int n) {
		if (n < 2)
			return false;
		if (n == 2)
			return true;
		if (n % 2 == 0)
			return false;

		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}
}

//以下、高速スキャナークラス
class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
      try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
        //input
        String[] input = br.readLine().split(" ");
        long A = Long.parseLong(input[0]);
        long B = Long.parseLong(input[1]);
        long K = Long.parseLong(input[2]);

        while(K > 0){
          if(A >= 1){
            if(K >= A){
              K = K - A;
              A = 0;
            }else{
              A = A - K;
              break;
            }
          }else if(B >= 1){
            if(K >= B){
              K = K - B;
              B = 0;
            }else{
              B = B - K;
              break;
            }
          }else{
            break;
          }
        }

        System.out.println(A + " " + B);
      }
    }
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.ConnectException;
import java.rmi.dgc.Lease;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;

import static java.util.Comparator.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		main.out.close();
	}

	// ======================================================================
	public void solve() {
		long A = nl();
		long B = nl();
		long K = nl();
		if(A >= K) {
			out.println(A - K + " " + B);
		} else {
			out.println("0 " + (A+B >= K ? A+B- K : 0));
		}
	}

	// ------------------------------------------
	// ライブラリ
	// ------------------------------------------
	// Print
	private PrintWriter out = new PrintWriter(System.out);

	// Scanner
	private FastScanner scan = new FastScanner();

	int ni() {
		return scan.nextInt();
	}

	int[] ni(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = ni();
		}
		return a;
	}

	int[][] ni(int y, int x) {
		int[][] a = new int[y][x];
		for (int i = 0; i < y; i++) {
			for (int j = 0; j < x; j++) {
				a[i][j] = ni();
			}
		}
		return a;
	}

	long nl() {
		return scan.nextLong();
	}

	long[] nl(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++) {
			a[i] = nl();
		}
		return a;
	}

	long[][] nl(int y, int x) {
		long[][] a = new long[y][x];
		for (int i = 0; i < y; i++) {
			for (int j = 0; j < x; j++) {
				a[i][j] = nl();
			}
		}
		return a;
	}

	String ns() {
		return scan.next();
	}

	String[] ns(int n) {
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = ns();
		}
		return a;
	}

	String[][] ns(int y, int x) {
		String[][] a = new String[y][x];
		for (int i = 0; i < y; i++) {
			for (int j = 0; j < x; j++) {
				a[i][j] = ns();
			}
		}
		return a;
	}
}

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            long A = in.nextLong();
            long B = in.nextLong();
            long K = in.nextLong();

            if (A >= K) {
                A -= K;
                K = 0;
            } else {
                A = 0;
                K -= A;
            }

            if (B >= K) {
                B -= K;
                K = 0;
            } else {
                B = 0;
                K -= B;
            }

            System.out.println(A + " " + B);
        }
    }
}


import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long k = sc.nextLong();
        for (int i = 1; i < k; i++) {
            if (a >= 1 && b >= 1) a--;
            if (a == 0 && b >= 1) b--;
            if (a == 0 && b == 0) break;
        }
        System.out.print(a + "" + b);
    }
}


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      int A=sc.nextInt();
      int B=sc.nextInt();
      int K=sc.nextInt();
      int cnt=1;
      while(cnt<=K){
         if(A>=1){
            A--;
         }else if(B>=1){
            B--;
         }
         cnt++;
      }
      System.out.print(A+" ");
      System.out.print(B);
   }
}


#include<stdio.h>

int main(void)
{
	long long int a, b, k;
	scanf("%lld %lld %lld", &a, &b, &k);

	if (a > k){
		a -= k;
	}

	else{
		k -= a;
		a = 0;
		if (b > k){
			b -= k;
		}
		else{
			b = 0;
		}
	}

	printf("%lld %lld\n", a, b);

	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <ctype.h>
#include <math.h>
using namespace std;

int main(){
    int64_t a,b,k;
    cin>>a>>b>>k;
    if(a>=k){
        cout<<a-k<<" "<<b<<endl;
    }
    else if(a+b<k){
        cout<<0<<" "<<0<<endl;
    }
    else{
        cout<<0<<" "<<b-k+a<<endl;
    }
}


#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <iostream>
#include <string>
#include<algorithm>
#include <vector>
#include <cassert>
#include<cmath>
using namespace std;
int main() {
	long long i, j;
	long long A;
	long long B;
	long long K;

	cin >> A >> B >> K;

	if (K<=A) {
		cout << A-K<<" " << B << endl;
	}
	else if (K<=A+B) {
		cout << 0 << " " << B-(K-A) << endl;
	}
	else {
		cout << 0 << " " << 0 << endl;
	}

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define all(z) (z).begin(),(z).end()
#define MOD 1000000007
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll isprime(ll n)
{
	for(int i=2;i<n;i++)
		if(n%i==0)
		return 0;

	return 1;
}
ll gcd(ll a,ll b)
{
    if(a==0)
        return b;
    return gcd(b%a,a);
 }
ll lcm(ll a,ll b)
{
	return (a*b)/gcd(a,b);
}
int main()
{
    FAST;
    ll a,b,k;
    cin>>a>>b>>k;
    while(k--)
    {
    	if(a>=1)a--;
    	else if(b>=1)b--;
    }
    cout<<a<<" "<<b;

}


#include <bits/stdc++.h>

using namespace std;

int main() {
    long long a, b, k; cin >> a >> b >> k;
    long long num = min(k, a);
    a -= num; k -= num;
    b -= k;
    cout << a << " " << b << "\n";
}


#include "bits/stdc++.h"

#define REP(i, n, N) for(ll i=(n); i<(N); i++)
#define RREP(i, n, N) for(ll i=(N-1); i>=(n); i--)
#define LREP(lst,itr) for(auto itr = lst.begin(); itr != lst.end(); ++itr)
#define CK(n, a, b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define MCP(a, b) memcpy(b,a,sizeof(b))
#define P(s) cout<<(s)<<endl
#define P2(a, b) cout<<(a)<<" "<<(b)<<endl
#define P3(a, b, c) cout<<(a)<<" "<<(b)<<" "<<(c)<<endl
#define V2(T) vector<vector<T>>
typedef long long ll;
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;

int main(){
    ll A, B, K;
    cin >> A >> B >> K;
    if((A-K)>=0){
        P(A-K);
    }else{
        K = max(A+B-K, (ll)0);
        P(K);
    }
    return 0;
}


#include<stdio.h>
int main()
{
long a,b,k;
scanf("%ld %ld %ld",&a,&b,&k);
if(a>=k)
printf("%ld %ld",a-k,b);
else if(a+b<=k)
printf("0 0");
else printf("0 %ld",a+b-k);
    printf("\n");
    return 0;
}


#include <stdio.h>

int main(void)
{

    unsigned long l_havingCookieCountOfTakahashi;
    unsigned long l_havingCookieCountOfAoki;
    unsigned long l_repeatCount;

    scanf("%ld%ld%ld", &l_havingCookieCountOfTakahashi, &l_havingCookieCountOfAoki, &l_repeatCount);

    if (l_havingCookieCountOfTakahashi > l_repeatCount)
    {
        l_havingCookieCountOfTakahashi -= l_repeatCount;
    }
    else if (l_havingCookieCountOfTakahashi == l_repeatCount)
    {
        l_havingCookieCountOfTakahashi = 0;
    }
    else
    {
        l_repeatCount -= l_havingCookieCountOfTakahashi;
        l_havingCookieCountOfTakahashi = 0;
        if (l_repeatCount <= l_havingCookieCountOfAoki)
        {
            l_havingCookieCountOfAoki -= l_repeatCount;
        }
        else
        {
            l_havingCookieCountOfAoki = 0;
        }
    }

    printf("%ld %ld", l_havingCookieCountOfTakahashi, l_havingCookieCountOfAoki);

}


#include<stdio.h>
int main()
{
	long long int a,b,k;
	scanf("%lld %lld %lld",&a,&b,&k);
	if(a>=k)
	{
		printf("%lld %lld",a-k,b);
	}
	else
	{
		if(b+a>=k)
		{
			printf("0 %lld",b-k+a);
		}
		else
		{
			printf("0 0");
		}
	}
}


#include<stdio.h>

int main()
{
    long long int a,b,k;
    scanf("%lld %lld %lld",&a,&b,&k);
    if(k>a){

        b=b-(k-a);
        a=0;

    }
    else if(k<a){
        a=a-k;
        b=b;

    }
    else if(k==a){
        a=0;
        b=b;

    }
    else{
        a=a;
        b=b;

    }
    printf("%lld %lld",a,b);
}


#include<stdio.h>

int main()
{
    long long int a,b,k;
    scanf("%lld %lld %lld",&a,&b,&k);
    if(k>a){

        b=b-(k-a);
        a=0;

    }
    else if(k<a){
        a=a-k;
        b=b;

    }
    else if(k==a){
        a=0;
        b=b;

    }
    else if(k==0){
        a=a;
        b=b;

    }
    printf("%lld %lld",a,b);
}


#include<stdio.h>
int main()
{
    long long int a,b,k;
    scanf ("%lld",&a);
    scanf ("%lld",&b);
    scanf ("%lld",&k);
    a=a-k;
    k=k-a;
    if (a<0)
    {
        a=0;
    }
    if (k>0 && b>0)
    {
        b=b-k;
        if (b<0)
        {
            b=0;
        }
    }
    printf ("%lld %lld\n",a,b);
}


'use strict';
function main(input) {
  const arr = input.trim().split(' ');
  const a = Number(arr[0]);
  const b = Number(arr[1]);
  const c = Number(arr[2]);

  if (a + b < c) {
    console.log('0','0');
  } else if (a < c) {
    console.log(`${0} ${a + b - c}`);
  } else {
    console.log(`${a - c} ${b}`);
  }

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main (input) {
  input = input.split("\n")[0].split(" ").map(Number);
  var A = input[0];
  var B = input[1];
  var K = input[2];
  A -= K;
  if (A < 0) {
    B -= Math.abs(A);
    A = 0;
  }
  if (B < 0) {
    B = 0;
  }
  console.log("%d %d", A, B);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main (input) {
    input = input.split("\n");
    tmp = input[0].split(" ");
    var a = parseInt(tmp[0], 10);
    var b = parseInt(tmp[1], 10);
    var k = parseInt(tmp[2], 10);
    //console.log(input[0]);
    //console.log(a);
    if (a >= k) {
        console.log('%d %d', a - k, b);
    } else if(b>=k-a){
        console.log('%d %d', 0, b - (k - a));
    } else {
        console.log('%d %d', 0, 0);
    }
  }

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//ctrl+Dで入力終


'use strict';
function main(input) {
  const arr = input.trim().split(' ');
  const a = Number(arr[0]);
  const b = Number(arr[1]);
  const c = Number(arr[2]);

  if (a < c) {
    console.log(`${0} ${a + b - c}`);
  } else if (a + b < c) {
    console.log('0 0');
  } else {
    console.log(`${a - c} ${b}`);
  }

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict';
function main(input) {
  const arr = input.trim().split(' ');
  const a = Number(arr[0]);
  const b = Number(arr[1]);
  const c = Number(arr[2]);

  if (a <= c) {
    console.log(`${0} ${a + b - c}`);
  } else {
    console.log(`${a - c} ${b}`);
  }

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict';
function main(input) {
  const arr = input.trim().split(' ');
  const a = Number(arr[0]);
  const b = Number(arr[1]);
  const c = Number(arr[2]);

  if (a < c) {
    console.log(`${0} ${a + b - c}`);
  } else {
    console.log(`${a - c} ${b}`);
  }

}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import "fmt"

func main(){
	var A, B, K int64;

	fmt.Scan(&A, &B, &K);

	if A >=1{
		if A - K <= 0 {
			B += A-K
			if B < 0{
				B = 0;
			}
			A = 0;
		}else {
			A -= K;
		}
	}else if B >= 1 {
		if B - K > 0{
			B -= K
		}else {
			B = 0
		}
	}
	fmt.Println(A, B);
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	var a, b, k int
	sc.nextInts(&a, &b, &k)
	a, b = max(a-k, 0), max(min(b-(k-a), b), 0)
	fmt.Printf("%d %d\n", a, b)
}

type scanner struct {
	sc *bufio.Scanner
}

var sc *scanner

func init() {
	s := bufio.NewScanner(os.Stdin)
	s.Split(bufio.ScanWords)
	sc = &scanner{sc: s}
}

func (s *scanner) nextInts(ints ...*int) {
	for i := range ints {
		s.sc.Scan()
		*ints[i], _ = strconv.Atoi(s.sc.Text())
	}
}

func (s *scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

//Util
func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func maxInt(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func minInt(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func absInt(a int) int {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func absFloat64(a float64) float64 {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func maxFloat64(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}

func minFloat64(a, b float64) float64 {
	if a > b {
		return b
	} else {
		return a
	}
}

func str2Int(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

//Main
const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		return sc
	}()
)

var a, b, k int

func main() {
	sc.Split(bufio.ScanWords)
	a, b, k = nextInt(), nextInt(), nextInt()

	fmt.Printf("%d %d\n", maxInt(0, a-k), maxInt(0, minInt(b, b+a-k)))
}


//go:generate echo "https://atcoder.jp/contests/abc149/tasks/abc149_b"
package main

import (
	"bufio"
	"fmt"
	"io"
	"math/big"
	"os"
	"strconv"
)

var scan = newScanner(os.Stdin)

func Solve(A, B, K int) (int, int) {
	return imax(A-K, 0), imax(A+B-K, 0)
}

func main() {
	A, B, K := scan.Int(), scan.Int(), scan.Int()
	fmt.Println(Solve(A, B, K))
}

type scanner struct {
	*bufio.Scanner
}

func newScanner(r io.Reader) *scanner {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	s.Buffer(nil, 100000000)
	return &scanner{s}
}

func (s *scanner) String() string {
	s.Scan()
	return s.Text()
}

func (s *scanner) Strings(l int) []string {
	if l == 0 {
		return []string{}
	}
	sl := make([]string, l, l)
	for i := range sl {
		sl[i] = s.String()
	}
	return sl
}

func (s *scanner) Int() int {
	n, _ := strconv.Atoi(s.String())
	return n
}

func (s *scanner) Ints(l int) []int {
	if l == 0 {
		return []int{}
	}
	sl := make([]int, l, l)
	for i := range sl {
		sl[i] = s.Int()
	}
	return sl
}

func (s *scanner) Float64() float64 {
	f, _ := strconv.ParseFloat(s.String(), 64)
	return f
}

func (s *scanner) Floats64(l int) []float64 {
	if l == 0 {
		return []float64{}
	}
	sl := make([]float64, l, l)
	for i := range sl {
		sl[i] = s.Float64()
	}
	return sl
}

func (s *scanner) BigInt() *big.Int {
	n, _ := strconv.ParseInt(s.String(), 10, 64)
	return big.NewInt(n)
}

func (s *scanner) BigInts(l int) []*big.Int {
	if l == 0 {
		return []*big.Int{}
	}
	sl := make([]*big.Int, l, l)
	for i := range sl {
		sl[i] = s.BigInt()
	}
	return sl
}

func iabs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

func imax(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func imin(x, y int) int {
	if x < y {
		return x
	}
	return y
}

func ipow(x, n int) int {
	if n == 0 {
		return 1
	}
	a := ipow(x, n>>1)
	a *= a
	if n&1 != 0 {
		a *= x
	}
	return a
}

func isum(X []int) int {
	s := 0
	for _, x := range X {
		s += x
	}
	return s
}

func chmax(x *int, v int) {
	if *x < v {
		*x = v
	}
}

func chmin(x *int, v int) {
	if *x > v {
		*x = v
	}
}

func factor(n int) map[int]int {
	m := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			n /= i
			m[i]++
		}
	}
	if n != 1 {
		m[n]++
	}
	return m
}

var mod = 1000000007

func setMintMod(x int) {
	mod = x
}

type mint int

func newMint(v int) mint {
	return mint((v%mod + mod) % mod)
}

func (x mint) Add(y mint) mint {
	v := x + y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Sub(y mint) mint {
	v := x + mint(mod) - y
	if v >= mint(mod) {
		return v - mint(mod)
	}
	return v
}

func (x mint) Mul(y mint) mint {
	return (x * y) % mint(mod)
}

func (x mint) pow(n int) mint {
	if n == 0 {
		return mint(1)
	}
	a := x.pow(n >> 1)
	a = a.Mul(a)
	if n&1 != 0 {
		a = a.Mul(x)
	}
	return a
}

func (x mint) Inverse() mint {
	return x.pow(mod - 2)
}

func (x mint) Div(y mint) mint {
	return x * y.Inverse()
}

func (x mint) Neg() mint {
	return newMint(int(-x))
}

type factorial struct {
	fact        []mint
	factInverse []mint
}

func newFactorial(n int) *factorial {
	f := new(factorial)
	f.init(n)
	return f
}

func (f *factorial) init(n int) {
	fact := make([]mint, n+1, n+1)
	fact[0] = newMint(1)
	for i := 1; i <= n; i++ {
		fact[i] = fact[i-1].Mul(newMint(i))
	}

	inv := make([]mint, n+1, n+1)
	inv[n] = fact[n].Inverse()
	for i := n; i >= 1; i-- {
		inv[i-1] = inv[i].Mul(newMint(i))
	}

	f.fact = fact
	f.factInverse = inv
}

func (f *factorial) Get(n int) mint {
	return f.fact[n]
}

func (f *factorial) GetInverse(n int) mint {
	return f.factInverse[n]
}

func (f *factorial) Permutation(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[n-k])
}

func (f *factorial) Combination(n, k int) mint {
	if k < 0 || n < k {
		return 0
	}
	return f.fact[n].Mul(f.factInverse[k]).Mul(f.factInverse[n-k])
}

type sieve struct {
	n          int
	primes     []int
	maxFactors []int
}

func newSieve(n int) *sieve {
	s := &sieve{
		n:          n,
		primes:     []int{},
		maxFactors: make([]int, n+1, n+1),
	}
	s.init()
	return s
}

func (s *sieve) init() {
	s.maxFactors[0] = -1
	s.maxFactors[1] = -1
	for i := 2; i <= s.n; i++ {
		if s.maxFactors[i] != 0 {
			continue
		}
		s.primes = append(s.primes, i)
		s.maxFactors[i] = i
		for j := i * i; j <= s.n; j += i {
			if s.maxFactors[j] == 0 {
				s.maxFactors[j] = i
			}
		}
	}
}

func (s *sieve) IsPrime(x int) bool {
	return s.maxFactors[x] == x
}

func (s *sieve) Factor(x int) map[int]int {
	m := map[int]int{}
	for x != 1 {
		m[s.maxFactors[x]]++
		x /= s.maxFactors[x]
	}
	return m
}


package main

import "fmt"

func main() {
	var a, b, k int
	fmt.Scan(&a, &b, &k)
	for i:=0; i<k; i++{
		if a>=1 {
			a--
		}else if b >=1{
			b--
		}

		if a==0 && b == 0{
			break
		}
	}
	fmt.Println(a, b)
}


package main

import "fmt"

func main() {
	var a, b, k int
	fmt.Scan(&a, &b, &k)
	for i:=0; i<k; i++{
		if a>=1 {
			a--
		}else if b >=1{
			b--
		}
	}
	fmt.Println(a, b)
}


a,b,k = gets.split.map(&:to_i)
if a >= k
  puts "#{a-k} #{b}"
elsif (a+b) <= k
  puts "#{0} #{0}"
else
  puts  "#{0} #{b-(k-a)}"
end


A, B, K = gets.chomp.split.map(&:to_i)
puts "#{[A-K, 0].max} #{[B, [B+A-K, 0].max].min}"


line = gets.split(' ').map(&:to_i)

A = line[0]
B = line[1]
K = line[2]

if K < A then
  tak = A - K
  aok = B
elsif K < A + B then
  tak = 0
  aok = B - (K - A)
else
  tak = 0
  aok = 0
end

print tak.to_s + " " + aok.to_s


a,b,c=gets.split.map(&:to_i)
if a<c
  c-=a
  a=0
  p c
  if b<c
    b=0
  else
    b-=c
  end
else
  a-=c
end
puts [a,b].join ' '


a,b,c=gets.split.map(&:to_i)
if a<c
  a=0
  c-=a
  if b<c
    b=0
  else
    b-=c
  end
else
  a-=c
end
puts [a,b].join ' '


a, b, k = gets().chomp.split("\s").map{|x| x.to_i}

ar = a - k
ar = 0 if ar < 0

kr = k - a
br = b - kr
br = 0 if br < 0

puts "#{ar} #{br}"


fn main() {
    let abk = read_vec::<u64>();
    let mut a = abk[0];
    let b = abk[1];
    let mut k = abk[2];

    if a > k {
        println!("{} {}", a-k, b);
        return
    }

    k -= a;
    a = 0;

    if b > k {
        println!("{} {}", a, b-k);
        return
    }

    println!("{} {}", 0, 0);
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}


#![allow(unused_macros, deprecated)]

#[allow(dead_code)]
mod utils {
    use std::io::{
        self, BufRead, BufReader, BufWriter, Seek, SeekFrom, Stdin, StdinLock, Stdout, StdoutLock,
        Write,
    };
    use std::mem;
    use std::ops::{Deref, DerefMut};
    use std::ptr;
    use std::slice;
    use std::str::{self, FromStr};

    #[inline]
    fn is_space_or_line_break(b: &u8) -> bool {
        *b == b' ' || *b == b'\n'
    }

    pub struct Scanner<R: BufRead> {
        reader: R,
        buf: Vec<u8>,
    }

    impl<R: BufRead> Scanner<R> {
        #[inline]
        pub fn new(reader: R) -> Scanner<R> {
            Scanner {
                reader: reader,
                buf: Vec::with_capacity(100),
            }
        }

        pub fn read<T: FromStr>(&mut self) -> T {
            self.read_until(is_space_or_line_break);
            self.parse()
        }

        pub fn read2<T1: FromStr, T2: FromStr>(&mut self) -> (T1, T2) {
            (self.read(), self.read())
        }

        pub fn read3<T1: FromStr, T2: FromStr, T3: FromStr>(&mut self) -> (T1, T2, T3) {
            (self.read(), self.read(), self.read())
        }

        pub fn read4<T1: FromStr, T2: FromStr, T3: FromStr, T4: FromStr>(
            &mut self,
        ) -> (T1, T2, T3, T4) {
            (self.read(), self.read(), self.read(), self.read())
        }

        pub fn reads(&mut self) -> &str {
            self.read_until(is_space_or_line_break);
            unsafe { str::from_utf8_unchecked(&self.buf) }
        }

        pub fn readl(&mut self) -> &str {
            self.buf.clear();
            self.reader.read_until(b'\n', &mut self.buf).unwrap();
            let bytes = if self.buf.last() == Some(&b'\n') {
                &self.buf[..self.buf.len() - 1]
            } else {
                &self.buf
            };
            unsafe { str::from_utf8_unchecked(&bytes) }
        }

        pub fn read_vec<T: FromStr>(&mut self, count: usize) -> Vec<T> {
            (0..count).map(|_| self.read()).collect()
        }

        fn read_until<P: FnMut(&u8) -> bool>(&mut self, mut predicate: P) {
            self.buf.clear();
            let mut first = true;

            // https://doc.rust-lang.org/src/std/io/mod.rs.html#1623-1649
            loop {
                let (done, used) = {
                    let available = self.reader.fill_buf().unwrap();
                    if first && available.len() == 0 {
                        panic!("Scan Error (EOF reached)");
                    }

                    match available.iter().position(&mut predicate) {
                        Some(0) if first => (false, 1),
                        Some(i) => {
                            self.buf.extend_from_slice(&available[..i]);
                            (true, i + 1)
                        }
                        None => {
                            self.buf.extend_from_slice(available);
                            (false, available.len())
                        }
                    }
                };

                self.reader.consume(used);
                if done || used == 0 {
                    return;
                }

                first = false;
            }
        }

        #[inline]
        fn parse<T: FromStr>(&mut self) -> T {
            // 文字列をT型へパースする
            let elem = unsafe { str::from_utf8_unchecked(&self.buf) };
            elem.parse()
                .unwrap_or_else(|_| panic!(format!("failed parsing: {}", elem)))
        }
    }

    impl<R: BufRead + Seek> Seek for Scanner<R> {
        #[inline]
        fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
            self.reader.seek(pos)
        }
    }

    pub struct StdinScanner {
        stdin: Stdin,
        scanner: Scanner<BufReader<StdinLock<'static>>>,
    }

    impl StdinScanner {
        #[inline]
        pub fn new() -> StdinScanner {
            let stdin = io::stdin();
            let stdinlock = unsafe { mem::transmute(stdin.lock()) };
            let reader = BufReader::with_capacity(4096, stdinlock);
            let scanner = Scanner::new(reader);
            StdinScanner {
                stdin: stdin,
                scanner: scanner,
            }
        }
    }

    impl Deref for StdinScanner {
        type Target = Scanner<BufReader<StdinLock<'static>>>;

        #[inline]
        fn deref(&self) -> &Self::Target {
            &self.scanner
        }
    }

    impl DerefMut for StdinScanner {
        #[inline]
        fn deref_mut(&mut self) -> &mut Self::Target {
            &mut self.scanner
        }
    }

    pub struct StdoutWriter {
        stdout: Stdout,
        writer: BufWriter<StdoutLock<'static>>,
    }

    impl StdoutWriter {
        #[inline]
        pub fn new() -> StdoutWriter {
            let stdout = io::stdout();
            let stdoutlock = unsafe { mem::transmute(stdout.lock()) };
            let writer = BufWriter::with_capacity(4096, stdoutlock);
            StdoutWriter {
                stdout: stdout,
                writer: writer,
            }
        }

        pub fn write<T: Writable>(&mut self, v: T) {
            v.display(&mut self.writer);
        }

        pub fn writeln<T: Writable>(&mut self, v: T) {
            v.display(&mut self.writer);
            self.writer.write_all(b"\n").unwrap();
        }

        pub fn write_horizontal<I>(&mut self, iter: I)
        where
            I: IntoIterator,
            I::Item: Writable,
        {
            let mut it = iter.into_iter();
            if let Some(elem) = it.next() {
                elem.display(&mut self.writer);
            } else {
                return;
            }

            for elem in it {
                elem.display(&mut self.writer);
                self.writer.write_all(b" ").unwrap();
            }
        }

        pub fn write_vertical<I>(&mut self, iter: I)
        where
            I: IntoIterator,
            I::Item: Writable,
        {
            let mut it = iter.into_iter();
            if let Some(elem) = it.next() {
                elem.display(&mut self.writer);
            } else {
                return;
            }

            for elem in it {
                elem.display(&mut self.writer);
                self.writer.write_all(b"\n").unwrap();
            }
        }
    }

    impl Write for StdoutWriter {
        #[inline]
        fn flush(&mut self) -> io::Result<()> {
            self.writer.flush()
        }

        #[inline]
        fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
            self.writer.write(buf)
        }
    }

    static DEC_DIGITS_LUT: &'static [u8; 200] = b"0001020304050607080910111213141516171819\
            2021222324252627282930313233343536373839\
            4041424344454647484950515253545556575859\
            6061626364656667686970717273747576777879\
            8081828384858687888990919293949596979899";

    fn write_int<W: Write>(mut writer: W, mut n: u64, is_negative: bool) {
        unsafe {
            let mut buf: [u8; 39] = mem::uninitialized();
            let buf_ptr_start = buf.as_mut_ptr().offset(39);
            let mut buf_ptr = buf_ptr_start;
            let lut_ptr = DEC_DIGITS_LUT.as_ptr();

            while n >= 10000 {
                let rem = (n % 10000) as isize;
                n /= 10000;

                let d1 = (rem / 100) << 1;
                let d2 = (rem % 100) << 1;
                buf_ptr = buf_ptr.offset(-4);
                ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr, 2);
                ptr::copy_nonoverlapping(lut_ptr.offset(d2), buf_ptr.offset(2), 2);
            }

            let mut n = n as isize; // possibly reduce 64bit math

            // decode 2 more chars, if > 2 chars
            if n >= 100 {
                let d1 = (n % 100) << 1;
                n /= 100;
                buf_ptr = buf_ptr.offset(-2);
                ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr, 2);
            }

            // decode last 1 or 2 chars
            if n < 10 {
                buf_ptr = buf_ptr.offset(-1);
                *buf_ptr = (n as u8) + b'0';
            } else {
                let d1 = n << 1;
                buf_ptr = buf_ptr.offset(-2);
                ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr, 2);
            }

            if is_negative {
                buf_ptr = buf_ptr.offset(-1);
                *buf_ptr = b'-';
            }

            let buf_slice =
                slice::from_raw_parts(buf_ptr, buf_ptr_start as usize - buf_ptr as usize);

            writer.write_all(buf_slice).unwrap();
        }
    }

    pub trait Writable {
        fn display<W: Write>(&self, writer: &mut W);
    }

    impl Writable for str {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            writer.write_all(self.as_bytes()).unwrap()
        }
    }

    impl<'a> Writable for &'a str {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            writer.write_all(self.as_bytes()).unwrap()
        }
    }

    impl Writable for String {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            writer.write_all(self.as_bytes()).unwrap()
        }
    }

    impl Writable for bool {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            let s: &'static [u8] = if *self { b"Yes" } else { b"No" };
            writer.write_all(s).unwrap();
        }
    }

    macro_rules! impl_writable_int {
        ($($int:ty)*) => {
            $(
                impl Writable for $int {
                    #[allow(unused_comparisons)]
                    fn display<W: Write>(&self, writer: &mut W) {
                        let is_negative = !(*self >= 0);
                        let abs = if is_negative {
                            (!*self as u64).wrapping_add(1)
                        } else {
                            *self as u64
                        };
                        write_int(writer, abs, is_negative);
                    }
                }
            )*
        };
    }

    macro_rules! impl_writable_float {
        ($($float:ty)*) => {
            $(
                impl Writable for $float {
                    #[inline]
                    fn display<W: Write>(&self, writer: &mut W) {
                        write!(writer, "{}", *self).unwrap();
                    }
                }
            )*
        }
    }

    impl_writable_int!(u8 u16 u32 u64 usize i8 i16 i32 i64 isize);
    impl_writable_float!(f32 f64);

    pub static mut SCANNER: *mut StdinScanner = 0 as *mut StdinScanner;
    pub static mut WRITER: *mut StdoutWriter = 0 as *mut StdoutWriter;

    #[inline]
    pub fn atcoder_initialize() {
        unsafe {
            SCANNER = mem::transmute(Box::new(StdinScanner::new()));
            WRITER = mem::transmute(Box::new(StdoutWriter::new()));
        }
    }

    #[inline]
    pub fn atcoder_finish() {
        unsafe {
            (*WRITER).flush().unwrap();
        }
    }
}

macro_rules! input {
    () => {};
    (@scanner $scanner:ident, @pred [ $($pred:tt)* ], ($var1:tt, $var2:tt) : [($t1:tt, $t2:tt) ; $len:expr]) => {
        let mut $var1 = Vec::with_capacity($len as usize);
        let mut $var2 = Vec::with_capacity($len as usize);

        for _ in 0..$len {
            $var1.push(scan!($scanner, $t1));
            $var2.push(scan!($scanner, $t2));
        }
    };
    (@scanner $scanner:ident, @pred [ $($pred:tt)* ], $var:tt : $t:tt) => {
        let $($pred)* $var = scan!($scanner, $t);
    };
    (@scanner $scanner:ident,) => {};
    (@scanner $scanner:ident, $var:tt : $t:tt) => {
        input!(@scanner $scanner, @pred [], $var : $t);
    };
    (@scanner $scanner:ident, mut $var:tt : $t:tt) => {
        input!(@scanner $scanner, @pred [mut], $var : $t);
    };
    (@scanner $scanner:ident, $var:tt : $t:tt, $($r:tt)*) => {
        input!(@scanner $scanner, $var : $t);
        input!(@scanner $scanner, $($r)*);
    };
    (@scanner $scanner:ident, mut $var:tt : $t:tt, $($r:tt)*) => {
        input!(@scanner $scanner, mut $var : $t);
        input!(@scanner $scanner, $($r)*);
    };
    ($($r:tt)*) => {
        let scanner_ref = unsafe { &mut *$crate::utils::SCANNER };
        input!(@scanner scanner_ref, $($r)*);
    }
}

macro_rules! scan {
    ($scanner:ident, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| scan!($scanner, $t)).collect::<Vec<_>>()
    };
    ($scanner:ident, usize1) => {
        scan!($scanner, usize) - 1
    };
    ($scanner:ident, line) => {
        $scanner.readl().to_string()
    };
    ($scanner:ident, $t:ty) => {
        $scanner.read::<$t>()
    };
}

macro_rules! pprint {
    ($value:expr) => {
        unsafe {
            (*$crate::utils::WRITER).write($value);
        }
    };
    ($value:expr, $($r:tt)*) => {
        let writer = unsafe { &*$crate::utils::WRITER };
        writer.write($value);
        writer.write(" ");
        pprint!($($r)*);
    };
}

macro_rules! pprintln {
    ($value:expr) => {
        unsafe {
            (*$crate::utils::WRITER).writeln($value);
        }
    };
    ($value:expr, $($r:tt)*) => {
        let writer = unsafe { &*$crate::utils::WRITER };
        writer.write($value);
        writer.write(" ");
        pprintln!($($r)*);
    };
}

macro_rules! atcoder_main {
    ($func:ident) => {
        fn main() {
            $crate::utils::atcoder_initialize();
            $func();
            $crate::utils::atcoder_finish();
        }
    };
}

fn run() {
    input! {
        mut a: u64,
        mut b: u64,
        k: u64
    }

    if k > a {
        b = b.saturating_sub(k - a);
    }

    a = a.saturating_sub(k);

    pprint!(a);
    pprint!(" ");
    pprintln!(b);
}

atcoder_main!(run);


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main(){
    input!{
        v: [u64; 3]
    }
    if v[0] > v[2] {print!("{} {}", v[0]-v[2], v[1])} else if v[0] + v[1] < v[2] {print!("0 0")} else {print!("0 {}",v[1]-(v[2]-v[0]))}
}


use proconio::{fastout, input};
#[allow(unused_mut)]
#[fastout]
fn main() {
    input! {
        a: usize,
        b: usize,
        k: usize
    }
    if k <= a {
        println!("{} {}", k - a, b);
    } else if k <= a + b {
        println!("{} {}", 0, a + b - k);
    } else {
        println!("0 0")
    }
}


use proconio::input;

fn main() {
    input! {
        a: usize,
        b: usize,
        k: usize,
    }

    solve(a, b, k);
}

fn solve(a: usize, b: usize, k: usize) {
    if a >= k {
        println!("{} {}", a - k, b);
        return;
    }
    println!("{} {}", 0, std::cmp::max(0, b - (k - a)));
}


use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        a: i128,
        b: i128,
        k: i128
    };

    let mut a = a;
    let mut b = b;
    let mut k = k;

    if a < k && a > 0 {
        k = k - a;
        a = 0;
        if b > 0 {
            b = b - k;
        }
    } else if a > 0 {
        a = k - a;
    } else if b > 0 {
        b = k - b;
    }

    println!("{} {}", a, b)
}


let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var carry = 0
var tak = arr[0] - arr[2]
if( tak < 0 ) {
  carry = tak
  tak = 0
}

var aok = arr[1] + carry
if( aok < 0 ) {
  aok = 0
}
print(tak,aok)


import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readStr() -> [String] {
  let str:String = readLine()!
  let arr:[String] = str.components(separatedBy: " ")
  return arr
}

let abk=readInts()
let a=abk[0]
var b=abk[1]
let k=abk[2]
let ak=max(0,a-k)
if(a<k) {b=max(0,a+b-k)}
print("\(ak) \(b)")


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let abk=readInts()
var a=abk[0]
var b=abk[1]
var k=abk[2]
var rest=k
if a-k>=0{
  a-=k
}else{
  rest=k-a
  a=0
  if b-rest>=0{
    b-=rest
  }else{
    b=0
  }
}
print(a,b)


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let abk=readInts()
var a=abk[0]
var b=abk[1]
var k=abk[2]
for _ in 1...k{
  if a>=1{
    a-=1
  }else if b>=1{
    b-=1
  }
}
print(a,b)


let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var carry = 0
var tak = arr[0] - arr[2]
if( tak < 0 ) {
  carry = tak
  tak = 0
}

var aok = arr[1] + carry
print(tak,aok)


import * as fs from "fs";

const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
//const n = +input[0];
//const a = [];
//for(let i=0;i<n;i++){
//	a.push(input[i+1].split(" ").map((x:string):number=>+x));
//}

//const [n, m] = input[0].split(" ").map((x: string): number => +x);
//const a = input[1].split(" ").map((x: string): number => +x);

const [a, b, k] = input[0].split(' ').map((x : string) : number => +x);

let kk = k;
if (k <= a){
    console.log(a-k,b);
}else{
    if (k-a <= b){
        console.log(0,b-(k-a));
    }else{
        console.log(0,0);
    }
}


export class Main {
  static main(input: string): string {
    const tmp: string[] = input.split("\n");
    const [a, b, k]: number[] = tmp[0].split(" ").map(int => parseInt(int));
    return `${Math.max(a - k, 0)} ${k - a >= 0 ? Math.max(b - (k - a), 0) : b}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));


import * as fs from 'fs';

//in
// 2 3 3
//out
// 0 2

function main(inp: string) {
    let [a, b, k]: number[] = inp.split(' ').map(Number)
    if (k >= a) {
        k = k - a;
        a = 0;
    } else {
        a = a - k;
        k = 0;
    }

    if (k > 0) {
        if (k >= b) {
            b = 0;
        } else {
            b = b - k;
        }
    }

    // Too　late
    // for (let i = 0; i < k; i++) {
    //     if (a > 0) {
    //         a--;
    //         continue
    //     }
    //     if (b > 0) {
    //         b--
    //     }
    // }
    console.log(`${a} ${b}`);
}

main(fs.readFileSync('/dev/stdin', 'utf8').trim());