import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        final int maxValue = 20;
        final int mod = (int) (1e9 + 7);
        int n;
        int[] s;
        int[][] dp;

        public void solve(int testNumber, InputReader in, OutputWriter out) {
//        StringBuilder sb = new StringBuilder();
//        for (int i = 1; ; i++) {
//            String s = Integer.toBinaryString(i);
//            if (maxLength < sb.length() + s.length()) {
//                out.printLine("MAX_VAL: " + (i - 1));
//                out.printLine("CNT CUT: " + i);
//                break;
//            }
//            sb.append(s);
////            out.printLine(i, s);
//        }

            n = in.readInt();
            s = new int[n];
            for (int i = 0; i < n; i++) {
                s[i] = in.readCharacter() - '0';
            }
            dp = new int[n + 1][1 << maxValue];
            dp[n][0] = 1;
            int ans = 0;
            for (int pos = n - 1; 0 <= pos; pos--) {
                for (int msk = 0; msk < (1 << maxValue); msk++) {
                    int dp_take_msk;
                    if (msk == 0) {
                        dp_take_msk = 1;
                    } else {
                        if (s[pos] == 0) {
                            dp_take_msk = dp[pos + 1][msk];
                        } else {
                            dp_take_msk = 0;
                            int val = 0;
                            for (int i = pos; i < n; ++i) {
                                val = (val << 1) | s[i];
                                if (maxValue < val) {
                                    break;
                                }
                                if (0 < val && (msk & (1 << (val - 1))) != 0) {
                                    dp_take_msk += dp[i + 1][msk ^ (1 << (val - 1))];
                                    if (mod <= dp_take_msk) {
                                        dp_take_msk -= mod;
                                    }
                                    dp_take_msk += dp[i + 1][msk];
                                    if (mod <= dp_take_msk) {
                                        dp_take_msk -= mod;
                                    }
                                }
                            }
                        }
                    }
                    dp[pos][msk] = dp_take_msk;
                    if (msk != 0 && (msk & (msk + 1)) == 0) {
                        ans += dp_take_msk;
                        if (mod <= ans) {
                            ans -= mod;
                        }
                    }
                }
            }
            out.printLine(ans);
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void printLine(int i) {
            writer.println(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return (c == ' ') || (c == '\n') || (c == '\r') || (c == '\t') || (c == -1);
        }

        public char readCharacter() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            return (char) c;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.util.*;
import java.util.stream.IntStream;

public class Main {

    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int h = in.nextInt();
        int m = in.nextInt();
        int[] a = IntStream.rangeClosed(1, n).toArray();
        Arrays.fill(a, h);
        while (m-- > 0) {
            int l = in.nextInt();
            int r = in.nextInt();
            int x = in.nextInt();
            for (int i = l; i <= r; i++) {
                a[i - 1] = Math.min(a[i - 1], x);
            }
        }
        System.out.println(Arrays.stream(a).reduce(0, (x, y) -> x + (int) Math.pow(y, 2)));
    }
}


import java.util.*;
import java.io.*;
import java.math.*;
import java.util.HashMap;

public class Main
{
    static class Reader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public static void main(String args[])
    {
        Reader sc=new Reader();
        PrintWriter out=new PrintWriter(System.out);
        int n=sc.i();
        int min=1000000000;
        for(int i=1;i<=Math.sqrt(n);i++)
        {
            if(n%i==0)
            min=Math.min(min,n/i-i);
        }
        for(int i=1;i<=Math.sqrt(n);i++)
        {
            if(n%i==0)
            {
                if(min==n/i-i)
                {
                    System.out.println(i+" "+n/i);
                    System.exit(0);
                }
            }
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.StringTokenizer;

public class Abood2D {

	static int n, min[], G[], pG[];

	static int solve(int c) {
		if(G[c] != -1)
			return G[c];

		HashSet<Integer> set = new HashSet<>();

		min[c] = c;

		for (int i = 2, j = 3; j <= c; j += ++i)
			if((c - j) % i == 0) {
				int l = 1 + (c - j) / i;
				int r = i + (c - j) / i;

				int x = pG[r] ^ pG[l - 1];

				if(x == 0)
					min[c] = Math.min(min[c], i);

				set.add(x);
			}

		int ans = 0;
		while(set.contains(ans))ans++;

		return G[c] = ans;

	}
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		n = sc.nextInt();

		G = new int[(int) 1e6 + 1];
		pG = new int[(int) 1e6 + 1];
		min = new int[(int) 1e6 + 1];

		Arrays.fill(G, -1);

		for (int i = 1; i <= n; i++)
			pG[i] = pG[i - 1] ^ solve(i);

		if(G[n] != 0)
			out.println(min[n]);
		else
			out.println(-1);

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}


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

public class Main{

	public void solve(){
		String a1 = next();
		String a2 =  next();
		String b1 = next();
		String b2 =  next();

		int[] a = new int[10];
		int i = 0;
		if(a1.charAt(0) != 'X') a[i++] = a1.charAt(0) - 'A';
		if(a1.charAt(1) != 'X') a[i++] = a1.charAt(1) - 'A';
		if(a2.charAt(1) != 'X') a[i++] = a2.charAt(1) - 'A';
		if(a2.charAt(0) != 'X') a[i++] = a2.charAt(0) - 'A';
		a[3] = a[0];
		a[4] = a[1];
		a[5] = a[2];
		i = 0;
		while(a[i] != 0) i++;

		int[] b = new int[10];
		int j = 0;
		if(b1.charAt(0) != 'X') b[j++] = b1.charAt(0) - 'A';
		if(b1.charAt(1) != 'X') b[j++] = b1.charAt(1) - 'A';
		if(b2.charAt(1) != 'X') b[j++] = b2.charAt(1) - 'A';
		if(b2.charAt(0) != 'X') b[j++] = b2.charAt(0) - 'A';
		b[3] = b[0];
		b[4] = b[1];
		b[5] = b[2];
		j = 0;
		while(b[j] != 0) j++;
		if(a[i] == b[j] && a[i + 1] == b[j + 1] && a[i + 2] == b[j + 2]){
			out.println("YES");
		}else{
			out.println("NO");
		}

	}

	private static PrintWriter out;
	public static void main(String[] args){
		out = new PrintWriter(System.out);
		new Main().solve();
		out.flush();
	}

	public static int nextInt(){
		int num = 0;
		String str = next();
		boolean minus = false;
		int i = 0;
		if(str.charAt(0) == '-'){
			minus = true;
			i++;
		}
		int len = str.length();
		for(;i < len; i++){
			char c = str.charAt(i);
			if(!('0' <= c && c <= '9')) throw new RuntimeException();
			num = num * 10 + (c - '0');
		}
		return minus ? -num : num;
	}

	public static long nextLong(){
		long num = 0;
		String str = next();
		boolean minus = false;
		int i = 0;
		if(str.charAt(0) == '-'){
			minus = true;
			i++;
		}
		int len = str.length();
		for(;i < len; i++){
			char c = str.charAt(i);
			if(!('0' <= c && c <= '9')) throw new RuntimeException();
			num = num * 10l + (c - '0');
		}
		return minus ? -num : num;
	}
	public static String next(){
		int c;
		while(!isAlNum(c = read())){}
		StringBuilder build = new StringBuilder();
		build.append((char)c);
		while(isAlNum(c = read())){
			build.append((char)c);
		}
		return build.toString();
	}

	private static byte[] inputBuffer = new byte[1024];
	private static int bufferLength = 0;
	private static int bufferIndex = 0;
	private static int read(){
		if(bufferLength < 0) throw new RuntimeException();
		if(bufferIndex >= bufferLength){
			try{
				bufferLength = System.in.read(inputBuffer);
				bufferIndex = 0;
			}catch(IOException e){
				throw new RuntimeException(e);
			}
			if(bufferLength <= 0) return (bufferLength = -1);
		}
		return inputBuffer[bufferIndex++];
	}

	private static boolean isAlNum(int c){
		return '!' <= c && c <= '~';
	}
}


import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class C implements Runnable {

    /*
    for
     foo := foo + pur
     bar := bar + 1
     ?  foo * quz,  bar * baz,  foo * quz
      baz := foo
      quz := bar

    baz / quz
     */

    public void solve() throws IOException {
        int foo = 0;
        int bar = 0;
        int baz = 0;
        int quz = 1;
        int tux = in.nextInt();
        for ( int i = 0; i < tux; i ++ ) {
            int pur = in.nextInt();
            foo += pur;
            bar += 1;
            if ( baz * bar <= foo * quz ) {
                baz = foo;
                quz = bar;
            }
        }
        out.println( 1.0 * baz / quz );
    }

    public Scanner in;

    public PrintWriter out;

    C() throws IOException {
        in = new Scanner(System.in);
        // in = new StreamTokenizer( new InputStreamReader( System.in ) );
        out = new PrintWriter(System.out);
    }

//    int nextInt() throws IOException {
//        in.nextToken();
//        return ( int ) in.nval;
//    }

    void check(boolean f, String msg) {
        if (!f) {
            out.close();
            throw new RuntimeException(msg);
        }
    }

    void close() throws IOException {
        out.close();
    }

    public void run() {
        try {
            solve();
            close();
        } catch (Exception e) {
            e.printStackTrace(out);
            out.flush();
            throw new RuntimeException(e);
        }
    }

    public static void main(String[] args) throws IOException {
        new Thread(new C()).start();
    }
}


import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import static java.util.Collections.*;
import java.io.*;

public class _290_C_WTF {

	public void solve() {
		int tux = ni();
		int d=0;
		int foo=0;
		int bar=0;
		int baz=0;
		int quz=1;
		for (int i = 0; i < tux; i++) {
			int pur = ni();
			foo+=pur;
			bar++;
			pr(foo,bar,baz,quz,foo*quz,bar*baz);
			if(foo*quz>bar*baz){
				baz=foo;
				quz=bar;
			}

		}
		out.println(baz/(double)quz);
	}

	// IO methods

	void run() throws Exception {
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		pr(System.currentTimeMillis() - s + "ms");
	}

	public static void main(String[] args) throws Exception {
		new _290_C_WTF().run();
	}

	InputStream in = System.in;
	PrintWriter out = new PrintWriter(System.out);

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private byte[] inbuf = new byte[1024];
	private int lenbuf = 0, ptrbuf = 0;

	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = in.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	private int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	public String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != //
									// ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	public char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

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

	public int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	public long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	void pr(Object... ob) {
		if (!oj)
			System.out.println(Arrays.deepToString(ob).replace("],", "],\n"));
	}
}


import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Sunits789
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int t=in.nextInt();
        double foo=0;
        double bar=0;
        double baz=0;
        double quz=0;
        for(int i=0;i<t;i++){
            double p=in.nextDouble();
            foo=foo+p;
            bar=bar+1;
            if(Math.max(foo*quz,bar*baz)==(foo*quz)){
                baz=foo;
                quz=bar;
            }
        }
        out.println(baz/quz);
    }
}

class InputReader{
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream){
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }
    public String next(){
        while (tokenizer == null||!tokenizer.hasMoreTokens()){
            try{
                tokenizer = new StringTokenizer(reader.readLine());
            }
            catch (IOException e){
                throw new RuntimeException(e);
            }

            catch (NullPointerException e){
                throw new UnknownError();
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt(){
        return Integer.parseInt(next());
    }

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

    }


import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.InputMismatchException;
import java.util.List;

public class Main {

    public static void main(String[] args) throws NumberFormatException,
            IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int TUX, FOO = 0, BAR = 0;
        double  BAZ = 0, QUZ = 1;
        boolean IT;
        TUX = Integer.parseInt(in.readLine());
        for (; !((TUX == 0)); TUX--) {
            int PUR = Integer.parseInt(in.readLine());
            FOO = (FOO + PUR);
            BAR = (BAR + 1);
            IT = (Math.max((FOO * QUZ), (BAR * BAZ)) == FOO * QUZ);
            if (IT) {
                BAZ = FOO;
                QUZ = BAR;
            }
        }
        System.out.println((double)BAZ / QUZ);

    }
    }


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		int tux = s.nextInt();
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 1;

		while(tux != 0){
			int pur = s.nextInt();
			foo = foo+pur;
			bar = bar+1;

			if ((foo*quz) >= (bar*baz)){
				baz = foo;
				quz = bar;
			}
			tux--;
		}
		System.out.println((double)baz/quz);

	}
}


public class Problem290C {
    public static void main(String[] args){
        java.util.Scanner in = new java.util.Scanner(System.in);

        int tux = Integer.parseInt(in.nextLine());
        int foo = 0;
        int bar = 0;
        int baz = 0;
        int quz = 1;

        for(; tux > 0; tux--){
            int pur = Integer.parseInt(in.nextLine());
            foo = foo + pur;
            bar++;

            if(foo*quz >= bar*baz){
                baz = foo;
                quz = bar;
            }
        }

        System.out.println((double)baz / quz);
    }
}


//package Round_FirstApril_2013;

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

import static java.lang.Math.*;

public class C {

    void solve () throws IOException {
        int n = in.nextInt();
        int foo = 0;
        int bar = 0;
        int baz = 0;
        int quz = 1;
        for (int i = n; i>0; i--){
            int pur = in.nextInt();
            foo += pur;
            bar ++;
            if (foo * quz > baz * bar){
                baz = foo;
                quz = bar;
            }
        }
        out.println (1.0 * baz / quz);

    }

    String input = "";
    String output = "";

    FastScanner in;
    PrintWriter out;

    void run () {
        try {
            BufferedReader bf;
            if (input.length() == 0)
                bf = new BufferedReader(new InputStreamReader(
                        System.in));
            else
                bf = new BufferedReader(new FileReader(input));
            in = new FastScanner(bf);

            if (output.length() == 0)
                out = new PrintWriter(System.out);
            else
                out = new PrintWriter(new File(output));

            solve();

            out.close();
        } catch (Exception ex) {
            out.close();
            ex.printStackTrace();
        }
    }

    public static void main (String[] args) {
        new C().run();
    }

    class FastScanner {
        BufferedReader bf;
        StringTokenizer st;

        FastScanner(BufferedReader bf) {
            this.bf = bf;
        }

        String next () throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(bf.readLine());
            return st.nextToken();
        }

        int nextInt () throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong () throws IOException {
            return Long.parseLong(next());
        }

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

        int[] readIntArray (int n) throws IOException {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        long[] readLongArray (int n) throws IOException {
            long a[] = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
    }
}


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

public class Main{
	static String s[] = new String[33];
	public static void main(String args[]) throws IOException {
		//BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int tux, foo, bar, baz, quz, pur;
		bar = 0; baz = 0; foo = 0; quz = 1;
		tux = in.nextInt();
		for(; tux > 0; tux--){
			pur = in.nextInt();
			foo += pur; bar++;
			if(foo * quz >= bar * baz){
				baz = foo;
				quz = bar;
			}

		}
		double ans = (double)baz;
		ans /= (double)quz;
		out.println(ans);
		out.flush();
	}
}


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

public class C {

	FastScanner in;
	PrintWriter out;
	final String fileName = "С".toLowerCase();

	void solve() {
		int n = in.nextInt();
		double sum = 0;
		double max = 0;
		for (int i = 0; i < n; i++) {
			sum += in.nextDouble();
			max = Math.max(max, sum / (i + 1));
		}
		out.println(max);
	}

	void run() {
		try {
			in = new FastScanner();
			out = new PrintWriter(System.out);
			solve();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

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

	public static void main(String[] args) {
		new C().run();
	}
}


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

public class PrC {
	public static void main(String[] args) throws IOException {
		new PrC().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;

	String nextToken() throws IOException {
		while(st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out, true);
		solve();
		out.flush();
	}

	void solve() throws IOException {
		int tux = nextInt();
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 1;
		for(int i = tux; i > 0; i--) {
			int pur = nextInt();
			foo = foo + pur;
			bar = bar + 1;
			if(Math.max(foo*quz, bar*baz) == foo*quz) {
				baz = foo;
				quz = bar;
			}
		}
		double baz1 = baz;
		baz1 = baz1/quz;
		out.println(baz1);
	}
}


import java.util.*;
public class cf290c {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int tux = in.nextInt();
    int foo = 0, bar = 0, baz = 0, quz = 1;
    while(tux-->0) {
      int pur = in.nextInt();
      foo += pur;
      bar++;
      if(Math.max(foo*quz, bar*baz) == foo*quz) {
        baz = foo;
        quz = bar;
      }
    }
    System.out.printf("%.10f%n", baz*1./quz);
  }
}


import java.util.Scanner;

public class MagicMonkey {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int tux = sc.nextInt();
		int foo=0,bar=0,baz=0,quz=1;
		while(tux-->0){
			int pur = sc.nextInt();
			foo = foo+pur;
			bar++;
			if(Math.max(foo*quz,bar*baz)==foo*quz){
				baz = foo;
				quz = bar;
			}
		}
		System.out.println((baz+0.0)/quz);
	}

}


import java.text.DecimalFormat;
import java.util.Scanner;

public class C1 {

 /**
  * @param args
  */
 public static void main(String[] args) {
  Scanner in = new Scanner(System.in);
  int tux = in.nextInt();
  int foo = 0;
  int bar = 0;
  int baz = 0;
  int quz = 1;
  for(;tux!=0;tux--) {
   int pur = in.nextInt();
   foo += pur;
   bar += 1;

   if(Math.max(foo*quz, bar*baz) == foo*quz){
    baz = foo;
    quz = bar;
   }
  }
  DecimalFormat df = new DecimalFormat("0.######");
  System.out.println(df.format(baz/(double)quz));
 }
}


import java.io.IOException;
import java.util.Scanner;

public class TC2
{
    public static void main( String[] args ) throws IOException
    {
        Scanner s=new Scanner( System.in );
        int N=s.nextInt();

        int foo=0, bar=0, baz=0, quz=1;

        for( int i=0; i<N; i++ )
        {
            int pur=s.nextInt();
            foo=foo+pur;
            bar++;
            if( Math.max( foo*quz, bar*baz ) == foo*quz )
            {
                baz=foo;
                quz=bar;
            }
        }

        double res=1.0*baz/quz;
        System.out.println(res );
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A3 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int TUX = Integer.parseInt(br.readLine());
        int FOO = 0;
        int BAR = 0;
        int BAZ = 0;
        int QUZ = 1;
        for(int i = 0; i < TUX; i++) {
            int PUR = Integer.parseInt(br.readLine());
            FOO = FOO + PUR;
            BAR = BAR + 1;
            if(FOO * QUZ >= BAR * BAZ) {
                BAZ = FOO;
                QUZ = BAR;
            }
        }
        System.out.println(1.0 * BAZ / QUZ);
    }
}


import java.util.*;
public class j {
public static void main(String[] args)
{
    Scanner input = new Scanner(System.in);

    int n = input.nextInt();
    double res = 0;
    double w = 0, l = 0;
    for(int i =0 ; i<n; i++)
    {
        if(input.nextInt()==1) w++;
        else l++;
        res = Math.max(res, w/(l+w));
    }
    System.out.println(res);
}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class C {
	BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st = null;

	private void solution() throws IOException {
		int tux = 0;
		tux = nextInt();
		int FOO = 0;
		int BAR = 0;
		int BAZ = 0;
		int QUZ = 1;
		while (tux-- > 0) {
			int pur = nextInt();
			FOO += pur;
			BAR++;
			if (Math.max(FOO * QUZ, BAR * BAZ) == FOO * QUZ) {
				BAZ = FOO;
				QUZ = BAR;
			}
		}
		double ans = BAZ * 1.0;
		ans /= QUZ;
		System.out.println(ans);

	}

	String nextToken() throws IOException {
		if (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(bf.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public void print(int a[]) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + " ");
		}
	}

	public static void main(String args[]) throws IOException {
		new C().solution();
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        c290 solver = new c290();
        solver.solve(1, in, out);
        out.close();
    }

    static class c290 {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
        /*int n = in.nextInt();
        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += in.nextInt();
        }
        out.println((double) sum / n);*/
            int TUX = in.nextInt();
            int FOO = 0;
            int BAZ = 0;
            int QUZ = 1;
            for (int BAR = 1; BAR <= TUX; BAR++) {
                int PUR = in.nextInt();
                FOO = FOO + PUR;
                if (Math.max((FOO * QUZ), (BAR * BAZ)) == (FOO * QUZ)) {
                    BAZ = FOO;
                    QUZ = BAR;
                }
            }
            out.println(((double) BAZ / QUZ));
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer stt;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        c290 solver = new c290();
        solver.solve(1, in, out);
        out.close();
    }

    static class c290 {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int TUX = in.nextInt();
            int FOO = 0;
            int BAZ = 0;
            int QUZ = 1;
            for (int BAR = 1; BAR <= TUX; BAR++) {
                FOO += in.nextInt();
                if ((BAR * BAZ) <= (FOO * QUZ)) {
                    BAZ = FOO;
                    QUZ = BAR;
                }
            }
            out.println(((double) BAZ / QUZ));
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer stt;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                return null;
            }
        }

        public String next() {
            while (stt == null || !stt.hasMoreTokens()) {
                stt = new StringTokenizer(nextLine());
            }
            return stt.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main implements Runnable {

	private void solve() throws IOException {
		int tux = nextInt();
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 1;
		while (tux != 0) {
			int pur = nextInt();
			foo += pur;
			++bar;
			if (Math.max(foo * quz, bar * baz) == foo * quz) {
				baz = foo;
				quz = bar;
			}
			--tux;
		}

		out.println((baz + .0) / quz);
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

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

	String next() throws IOException {
		while (!st.hasMoreTokens()) {
			String line = in.readLine();
			if (line == null)
				return null;
			eat(line);
		}
		return st.nextToken();
	}

	public static void main(String[] args) {
		new Thread(null, new Main(), "Main", 1 << 28).start();
	}

	private BufferedReader in;
	private PrintWriter out;
	private StringTokenizer st;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			eat("");
			solve();
			in.close();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	private void eat(String s) {
		st = new StringTokenizer(s);
	}

}


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

public class C {

	public static void main(String[] args) {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc = new Scanner(System.in);

		int tux = sc.nextInt();
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 1;
		for (; tux > 0; tux--) {
			int pur = sc.nextInt();

			foo += pur;
			bar++;

			if (Math.max(foo * quz, bar * baz) == foo * quz) {
				baz = foo;
				quz = bar;
			}
		}

		out.println(baz * 1.0 / quz);

		sc.close();
		out.close();
	}
}


import static java.lang.Math.*;
import static java.lang.System.currentTimeMillis;
import static java.lang.System.exit;
import static java.lang.System.arraycopy;
import static java.util.Arrays.sort;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.fill;
import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException {
		try {
			if (new File("input.txt").exists())
				System.setIn(new FileInputStream("input.txt"));
		} catch (SecurityException e) {
		}
		new Thread(null, new Runnable() {
			public void run() {
				try {
					new Main().run();
				} catch (Throwable e) {
					e.printStackTrace();
					exit(999);
				}
			}
		}, "1", 1 << 23).start();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

	private void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		in.close();
		out.close();
	}

	private void solve() throws IOException {
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 1;
		int n = nextInt();
		for (int i = 0; i < n; i++) {
			int pur = nextInt();
			foo += pur;
			bar++;
			if (max(foo * quz, bar * baz) == foo * quz) {
				baz = foo;
				quz = bar;
			}
		}
		out.println(1. * baz / quz);
	}

	void chk(boolean b) {
		if (b)
			return;
		System.out.println(new Error().getStackTrace()[1]);
		exit(999);
	}
	void deb(String fmt, Object... args) {
		System.out.printf(Locale.US, fmt + "%n", args);
	}
	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null)
				return true;
			st = new StringTokenizer(s);
		}
		return false;
	}
}


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

public class Solution {
    public static void main (String[] args) throws IOException {
        boolean online = "true".equals(System.getProperty("ONLINE_JUDGE"));
        if (online) {
            in = new InputReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
        else {
            in = new InputReader(new FileReader("input.txt"));
            out = new PrintWriter(new File("output.txt"));
        }

        new Solution().run();

        out.close();
    }

    private void run () {
        boolean it = false;
        int foo = 0,
            bar = 0,
            baz = 0,
            quz = 1,
            tux = in.nextInt();
        for (int i = 0; i < tux; ++i) {
            int pur = in.nextInt();
            foo += pur;
            ++bar;
            it = (foo*quz >= bar*baz);
            if (it) {
                baz = foo;
                quz = bar;
            }
        }
        out.println(baz*1.0/quz);
    }

    private static InputReader in;
    private static PrintWriter out;
}

class InputReader {
    public InputReader (Reader r) {
        buff = new BufferedReader(r);
        try {
            str = new StringTokenizer(buff.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public String next () {
        while (!str.hasMoreTokens())
            try {
                str = new StringTokenizer(buff.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        return str.nextToken();
    }

    public int nextInt () {
        return Integer.parseInt(this.next());
    }

    public long nextLong () {
        return Long.parseLong(this.next());
    }

    private static BufferedReader buff;
    private static StringTokenizer str;
}


import java.util.*; //Scanner;
import java.io.PrintWriter; //PrintWriter

public class R176_AprilFool_C //Name: WTF?
{
	public static void main(String[] args) {
		Scanner      in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		solve(in, out);
		out.close();
		in.close();
	}

	public static void solve(Scanner in, PrintWriter out)
	{
		int tux = in.nextInt();
        int foo = 0, bar = 0, baz = 0, quz = 1;
        while (tux != 0)
        {
            int pur = in.nextInt();
            foo += pur;
            bar++;
            if (foo * quz > bar * baz)
            {
                baz = foo;
                quz = bar;
            }
            tux--;
        }
        out.println((double) baz / (double)quz);
	}
}


import java.util.Scanner;

public class ProblemC {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int tux = sc.nextInt();
		int foo = 0;
		int bar = 0;
		double baz = 0;
		double quz = 1;
		for(;tux>0;tux--){
			int pur;
			pur = sc.nextInt();
			foo = foo + pur;
			bar++;
			if (Math.max(foo*quz, bar*baz) == foo*quz){
				baz = foo;
				quz = bar;
			}
		}
		System.out.println(baz / quz);
	}

}


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

public class c {
  public static void main(String[] args) throws Throwable {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int tux = Integer.parseInt(in.readLine());
    int foo = 0, bar = 0, baz = 0, quz = 1;
    for (int i = tux; i > 0; i--) {
      int pur = Integer.parseInt(in.readLine());
      foo += pur;
      bar++;
      if (foo * quz >= bar * baz) {
        baz = foo;
        quz = bar;
      }
    }
    System.out.println(baz * 1.0 / quz);
  }
}


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

public class C {
	public static void main(String[] args) {
		new C().run();
	}

	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}
		return in.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public void solve() throws IOException {
		int tux = nextInt();
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 1;
		while (tux-- != 0) {
			int pur = nextInt();
			foo += pur;
			bar++;
			if (Math.max(foo * quz, bar * baz) == foo * quz) {
				baz = foo;
				quz = bar;
			}
		}
		out.println(1. * baz / quz);
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}


import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Egor Kulikov (egor@egork.net)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
		int count = in.readInt();
		int[] numbers = IOUtils.readIntArray(in, count);
		double answer = 0;
		int sum = 0;
		for (int i = 0; i < count; i++) {
			sum += numbers[i];
			answer = Math.max(answer, (double)sum / (i + 1));
		}
		out.printLine(answer);
	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

    public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}

	}

class IOUtils {

	public static int[] readIntArray(InputReader in, int size) {
		int[] array = new int[size];
		for (int i = 0; i < size; i++)
			array[i] = in.readInt();
		return array;
	}

	}


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

public class Solurion {

	private void solve() throws Exception {
		/*int n = nextInt();
		double sum = 0;
		for (int i = 0; i < n; ++i) {
			sum += nextInt();
		}
		out.println(sum / n);*/
		int tux = nextInt();
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 1;
		/*if (foo * quz >= bar * baz )
		//if (foo * quz * bar)
		{
			System.out.println("YUP");
		} else {
			System.out.println("NO");
		}*/
		for (int i = 0; i < tux; ++i) {
			int pur = nextInt();
			foo = foo + pur;
			bar = bar + 1;
			if (foo * quz >= bar * baz )
			{
				baz = foo;
				quz = bar;
			}
		}
		out.println((double) baz / quz);
	}

	public void run() {
		try {
			solve();
		} catch (Exception e) {
			NOO(e);
		} finally {
			out.close();
		}
	}

	PrintWriter out;
	BufferedReader in;
	StringTokenizer St;

	void NOO(Exception e) {
		e.printStackTrace();
		System.exit(42);
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	long nextLong() {
		return Long.parseLong(nextToken());
	}

	double nextDouble() {
		return Double.parseDouble(nextToken());
	}

	String nextToken() {
		while (!St.hasMoreTokens()) {
			try {
				String line = in.readLine();
				if (line == null)
					return null;
				St = new StringTokenizer(line);
			} catch (Exception e) {
				NOO(e);
			}
		}
		return St.nextToken();
	}

	private Solurion(String name) {
		try {
			in = new BufferedReader(new FileReader("input.txt"));
			St = new StringTokenizer("");
			out = new PrintWriter(new FileWriter("output.txt"));
		} catch (Exception e) {
			NOO(e);
		}
	}

	private Solurion() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			St = new StringTokenizer("");
			out = new PrintWriter(System.out);
		} catch (Exception e) {
			NOO(e);
		}
	}

	public static void main(String[] args) {
		//Locale.setDefault(Locale.US);
		new Solurion().run();
	}
}


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

public class C {

	void solve() throws IOException {
		int tux = nextInt();
		int foo = 0;
		int bar = 0;
		int baz = 0;
		int quz = 0;
		for (int i =0; i<tux; i++) {
			int pur = nextInt();
			foo +=pur;
			bar++;
			if (foo*quz>=bar*baz) {
				baz = foo;
				quz = bar;
			}
		}
		out.println(1.0*baz/quz);
	}

	void run() throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new C().run();
	}

	BufferedReader br;
	PrintWriter out;
	StringTokenizer str;

	String next() throws IOException {
		while (str == null || !str.hasMoreTokens()) {
			str = new StringTokenizer(br.readLine());
		}
		return str.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

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

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

}


import java.util.Scanner;

public class Problem290C {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int tux = in.nextInt();
        double foo = 0;
        double bar = 0;
        double baz = 0;
        double quz = 1;
        for (int i = 0; i < tux; i++) {
            double pur = in.nextDouble();
            foo += pur;
            bar++;
            if (foo*quz >= bar*baz){
                baz = foo;
                quz = bar;
            }
        }
        System.out.printf("%.10f", baz / quz);
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Fabian Conejo (FabianConP)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int tux = in.readInt();
        int[] nums = in.readInts(tux);
        double ans = 0, sum=0;
        for(int i=0; i<tux;i++){
            sum+=nums[i];
            ans = Math.max(ans,sum/(i+1));
        }
        out.printLine(ans);
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public int[] readInts( int n ){
        int ans[]=new int[n];
        for( int i=0; i<n; i++ ) ans[i]=readInt();
        return ans;
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print( objects );
        writer.println();
    }

    public void close() {
        writer.close();
    }
}


import java.io.*;
public class Main {

    public static void main(String[] args) {
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       int tux;
        try{
       tux = Integer.parseInt(br.readLine());
        int foo = 0;
        int bar = 0;
        int baz = 0;
        int quz = 1;
        while(tux-- > 0)
        {
            int pur = Integer.parseInt(br.readLine());
            foo = foo + pur;
            bar = bar + 1;
            if(Math.max(foo * quz, bar * baz) == foo*quz)
            {
                baz = foo;
                quz = bar;
            }
        }
            System.out.println(1.0 * baz/quz);
        }catch(Exception e){}
    }
}


import java.util.*;
public class C {
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
													// HAI
		int TUX;        							// I HAS A TUX
		TUX=in.nextInt();   						// GIMMEH TUX
		int FOO=0;									//I HAS A FOO ITS 0
		int BAR=0;									//I HAS A BAR ITS 0
		int BAZ=0;									//I HAS A BAZ ITS 0
		int QUZ=1;									//I HAS A QUZ ITS 1
													//TUX IS NOW A NUMBR
		for(;TUX!=0;TUX--){ 						//IM IN YR LOOP NERFIN YR TUX TIL BOTH SAEM TUX AN 0
			int PUR;								//I HAS A PUR
			PUR=in.nextInt();						//GIMMEH PUR
													//PUR IS NOW A NUMBR
			FOO+=PUR;								//FOO R SUM OF FOO AN PUR
			BAR++;									//BAR R SUM OF BAR AN 1
			if(FOO*QUZ>=BAR*BAZ){
													//O RLY?
													//YA RLY
				BAZ=FOO;							//BAZ R FOO
				QUZ=BAR;							//QUZ R BAR
			}
													//OIC
		}											//IM OUTTA YR LOOP
													//BAZ IS NOW A NUMBAR
		System.out.println((double)BAZ/QUZ);				//VISIBLE SMOOSH QUOSHUNT OF BAZ QUZ
													//KTHXBYE
	}

}


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

public class Main {

    static final double eps = 1e-8;
    static final int mod = 1000 * 1000 * 1000 + 7;
    static final BigInteger modB = BigInteger.valueOf(mod);
    static int n;

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        pw = new PrintWriter(System.out);
        try {
           int tux=sc.nextInt();
           int foo=0;
           int bar=0;
           int baz=0;
           int quz=1;
           for (int i=tux;tux>0;tux--)
           {
               int pur = sc.nextInt();
               foo+=pur;
               bar++;
               if (Math.max(foo*quz,bar*baz)==foo*quz)
               {
                   baz=foo;
                   quz=bar;
               }
           }
           double x = (double)baz/(double)quz;
           pw.println(x);
        }

        finally {

            pw.close();
        }
    }

    static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    static BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    static StringTokenizer st ;
    static PrintWriter pw;
    static int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }
    static long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }
    static double nextDouble() throws IOException {
        in.nextToken();
        return in.nval;
    }
    static String next() throws IOException {
        in.nextToken();
        return in.sval;
    }
    static void outArray(int[] O) {
        for(int i = 0; i < O.length - 1; i++)
            pw.print(O[i] + " ");
        pw.println(O[O.length - 1]);
    }
    static void exit(Object arg)
    {
        pw.println(arg);
        pw.flush();
        System.exit(0);
    }
}


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

public class FirstApril {
    FastScanner in;
    PrintWriter out;

    void solve() {
        int n = in.nextInt();
        if (n == 0) {
            out.println(0);
            return;
        }
        int sum = 0;
        double max = 0;
        for (int i = 0; i < n; i++) {
            sum += in.nextInt();
            max = Math.max(sum / (1. + i), max);
        }
        out.println(max);
        /*
        String s = in.next();
        int sum = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'H') {
                sum += 12;
            } else {
                sum += s.length();
            }
        }
        out.println(sum % 2==0 ? "Yes" : "No");
        */
    }

    void run() {
        try {
            in = new FastScanner(new File("object.in"));
            out = new PrintWriter(new File("object.out"));

            solve();

            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {

        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }

    public static void main(String[] args) {
        new FirstApril().runIO();
    }
}


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

public class C {

    void solve() throws IOException {
        in("__std"); out("__std");

        int tux = readInt();
        int foo = 0;
        int bar = 0;
        int baz = 0;
        int quz = 1;
        while (tux-- > 0) {
            int pur = readInt();
            foo += pur;
            bar += 1;
            int max = Math.max(foo * quz, bar * baz);
            if (max == foo * quz) {
                baz = foo;
                quz = bar;
            }
        }
        println(1.0 * baz / quz);

        exit();
    }

    void in(String name) throws IOException {
        if (name.equals("__std")) {
            in = new BufferedReader(new InputStreamReader(System.in));
        } else {
            in = new BufferedReader(new FileReader(name));
        }
    }

    void out(String name) throws IOException {
        if (name.equals("__std")) {
            out = new PrintWriter(System.out);
        } else {
            out = new PrintWriter(name);
        }
    }

    void exit() {
        out.close();
        System.exit(0);
    }

    char readChar() throws IOException {
        return (char) in.read();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readToken());
    }

    long readLong() throws IOException {
        return Long.parseLong(readToken());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readToken());
    }

    String readLine() throws IOException {
        st = null;
        return in.readLine();
    }

    String readToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }

    boolean eof() throws IOException {
        return !in.ready();
    }

    void print(String format, Object ... args) {
        out.print(new Formatter(Locale.US).format(format, args));
    }

    void println(String format, Object ... args) {
        out.println(new Formatter(Locale.US).format(format, args));
    }

    void print(Object value) {
        out.print(value);
    }

    void println(Object value) {
        out.println(value);
    }

    void println() {
        out.println();
    }

    StringTokenizer st;

    BufferedReader in;
    PrintWriter out;

    public static void main(String[] args) throws IOException {
        new C().solve();
    }
}


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

public class Template implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

    class GraphBuilder {
        int n, m;
        int[] x, y;
        int index;
        int[] size;

        GraphBuilder(int n, int m) {
            this.n = n;
            this.m = m;
            x = new int[m];
            y = new int[m];
            size = new int[n];
        }

        void add(int u, int v) {
            x[index] = u;
            y[index] = v;
            size[u]++;
            size[v]++;
            index++;
        }

        int[][] build() {
            int[][] graph = new int[n][];
            for (int i = 0; i < n; i++) {
                graph[i] = new int[size[i]];
            }
            for (int i = index - 1; i >= 0; i--) {
                int u = x[i];
                int v = y[i];
                graph[u][--size[u]] = v;
                graph[v][--size[v]] = u;
            }
            return graph;
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readLongArray(int size) throws IOException {
        long[] res = new long[size];
        for (int i = 0; i < size; i++) {
            res[i] = readLong();
        }
        return res;
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    <T> List<T>[] createGraphList(int size) {
        List<T>[] list = new List[size];
        for (int i = 0; i < size; i++) {
            list[i] = new ArrayList<>();
        }
        return list;
    }

    public static void main(String[] args) {
        new Template().run();
        // new Thread(null, new Template(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    void solve() throws IOException {
        int n = readInt();
        double sum = 0;
        double max = 0;
        for (int i = 1; i <= n; i++) {
            sum += readInt();
            max = Math.max(max, sum / i);
        }
        out.println(max);
    }

}


import java.util.Scanner;

public class B {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		double a = 0, b = 0, max = 0;
		while (t-- > 0) {
			int n = sc.nextInt();
			if(n == 1) {
				a++;
			}
			b++;
			if(a / b > max) {
				max = a/b;
			}
		}
		System.out.println(max);
	}
}


import java.util.Scanner;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Fish <lyhypacm@gmail.com>
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.nextInt();
        int foo = 0, bar = 0, baz = 0, quz = 1;
        for (int i = 0; i < n; ++i) {
            int pur = in.nextInt();
            foo += pur;
            ++bar;
            if (foo * quz >= bar * baz) {
                baz = foo;
                quz = bar;
            } else break;
        }
        out.println(1.0 * baz / quz);
    }
}

class InputReader {
    private Scanner scanner;

    public InputReader(InputStream inputStream) {
        scanner = new Scanner(new BufferedReader(new InputStreamReader(inputStream)));
    }

    public int nextInt() {
        return scanner.nextInt();
    }

    public long nextLong() {
        return scanner.nextLong();
    }

    public String next() {
        return scanner.next();
    }

    public BigInteger nextBigInteger() {
        return scanner.nextBigInteger();
    }

    public BigDecimal nextBigDecimal() {
        return scanner.nextBigDecimal();
    }

    public double nextDouble() {
        return scanner.nextDouble();
    }
}

class OutputWriter {
    private PrintWriter printWriter;

    public OutputWriter(OutputStream outputStream) {
        printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        printWriter = new PrintWriter(writer);
    }

    public <T> void print(T object) {
        printWriter.print(object);
    }

    public <T> void println(T object) {
        printWriter.println(object);
    }

    public void println() {
        printWriter.println();
    }

    public void close() {
        printWriter.close();
    }
}


import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.FileReader;
import java.util.Arrays;
import java.util.Locale;
import java.util.Iterator;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Abrackadabra
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int tux = in.nextInt();
        int foo = 0;
        int bar = 0;
        int baz = 0;
        int quz = 1;

        for (int i = 0; i < tux; i++) {
            int pur = in.nextInt();

            foo += pur;
            bar++;

            if (Math.max(foo * quz, bar * baz) == foo * quz) {
                baz = foo;
                quz = bar;
            }
        }

        out.println(1d * baz / quz);
    }
}

class InputReader implements Iterable<String> {
    BufferedReader br;
    StringTokenizer in;

    public InputReader(String fileName) {
        try {
            br = new BufferedReader(new FileReader(fileName));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public InputReader(InputStream inputStream) {
        br = new BufferedReader(new InputStreamReader(inputStream));
    }

    String lastLine = null;

    boolean hasMoreTokens() {
        while (in == null || !in.hasMoreTokens()) {
            lastLine = nextLine();
            if (lastLine == null) {
                return false;
            }
            in = new StringTokenizer(lastLine);
        }
        return true;
    }

    public String nextString() {
        return hasMoreTokens() ? in.nextToken() : null;
    }

    public String nextLine() {
        boolean somethingLeft = in != null && in.hasMoreTokens();
        in = null;
        if (somethingLeft) {
            return lastLine;
        }
        try {
            return br.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

    public Iterator<String> iterator() {
        return new Iterator<String>() {
            @Override
            public boolean hasNext() {
                return hasMoreTokens();
            }

            @Override
            public String next() {
                return nextString();
            }

            @Override
            public void remove() {
                throw new RuntimeException();
            }
        };
    }
}

class OutputWriter {

    final PrintWriter out;

    public OutputWriter(String fileName) {
        try {
            out = new PrintWriter(fileName);
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
    }

    public OutputWriter(OutputStream outputStream) {
        out = new PrintWriter(outputStream);
    }

    public OutputWriter(Writer writer) {
        out = new PrintWriter(writer);
    }

    /* PrintWriter methods */

    public void close() {
        out.close();
    }

    public void println(double x) {
        out.println(x);
    }

    /* My helper methods */

    }


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

public class C implements Runnable {

	private void solve() throws IOException {
		int tux = nextInt(), foo = 0, bar = 0, baz = 0, quz = 1;
		while (tux-- > 0) {
			int pur = nextInt();
			foo += pur;
			bar++;
			if (Math.max(foo * quz, bar * baz) == foo * quz) {
				baz = foo;
				quz = bar;
			}
		}
		print(baz * 1. / quz);
	}

	public static void main(String[] args) {
		new C().run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter writer;

	public void run() {
		try {
			reader = new BufferedReader(new InputStreamReader(System.in));
			writer = new PrintWriter(System.out);
			solve();
			writer.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(261);
		}
	}

	void halt() {
		writer.close();
		System.exit(0);
	}

	void print(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	void println(Object... objects) {
		print(objects);
		writer.println();
	}

	String nextLine() throws IOException {
		return reader.readLine();
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(nextLine());
		return tokenizer.nextToken();
	}

	int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}
}


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

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author winterwind
 */
public class Oct28Phone {

    public static int subtr(String a) {
        int i = a.charAt(0) - '0';

        for(int j = 1; j < a.length(); j++) {
            if(Math.abs((a.charAt(j) - '0' + i) - 2*(a.charAt(j) - '0')) > 1) {
                return 0;
            }
            i = a.charAt(j) - '0';
        }
        return 1;
    }

    /**
     * @param args the command line arguments
     */

    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));

        String s = f.readLine();
        int n = s.length();
        long[][] dp = new long[n][10];
        for(int i = 0; i < 10; i++) {
            dp[0][i] = 1;
        }

        for(int i = 1; i < s.length(); i++) {
            int current = s.charAt(i) - '0';
            for(int j = 0; j < 10; j++) {
                if((j + current)%2 == 1) {
                    dp[i][(j + current + 1)/2] += dp[i - 1][j];
                    dp[i][(j + current - 1)/2] += dp[i - 1][j];
                }
                else {
                    dp[i][(j + current)/2] += dp[i - 1][j];
                }
            }
        }

        /*
        for(int i = 0; i < n; i++) {
            System.out.println(Arrays.toString(dp[i]));
        }
        */

        /*
        s = s.substring(0, s.length() - 1);
        int iter = 1;

        while(s.length() > 0) {
            int current = Integer.parseInt(s.substring(s.length() - 1));
            s = s.substring(0, s.length() - 1);
            System.out.println(current);

            for(int i = 0; i < 10; i++) {
                if((i + current)%2 == 1) {
                    //System.out.println(i + " " + Math.floor((double)(current + i)/2.0) + " " + Math.ceil((double)(current + i)/2.0));
                    dp[iter][i] += dp[iter - 1][(int) Math.floor((double)(current + i)/2.0)];
                    dp[iter][i] += dp[iter - 1][(int) Math.ceil((double)(current + i)/2.0)];
                    //System.out.println(dp[iter - 1][(int) Math.floor((double)(current + i)/2.0)] + " " + dp[iter - 1][(int) Math.ceil((double)(current + i)/2.0)]);
                }
                else {
                    dp[iter][i] += dp[iter - 1][(current + i)/2];
                }
            }
            System.out.println(iter + " " + Arrays.toString(dp[iter]));
            iter++;
        }
        */

        long sum = 0;
        for(int i = 0; i < 10; i++) {
            sum += dp[n - 1][i];
        }
        System.out.println(sum - subtr(s));
    }

}


import java.util.*;
import java.lang.*;
import java.io.*;
public final class Solution{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(br.readLine().trim());
        while(t-->0){
            int n = Integer.parseInt(br.readLine().trim());
            int sq = (int) (Math.sqrt(n));
            int cb = (int) (Math.cbrt(n));
            int count = sq+cb;
            for(int i=1;Math.pow(i,6)<=n;i++){
                count--;
            }
            System.out.println(count);
        }
    }
}


import static java.lang.System.exit;
import java.util.*;
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       Scanner sc=new Scanner(System.in);
       int n=sc.nextInt();
       sc.nextLine();
       String str=sc.nextLine();
       String st=str.toLowerCase();
       int nb=0;
       if(!st.contains("?")){
           System.out.println("NO");
           exit(0);
       }
       if(n==1 && st.charAt(0)=='?'){
           System.out.println("YES");
           exit(0);
       }
       if(n==1 && st.charAt(0)!='?'){
           System.out.println("NO");
           exit(0);
       }
       if(n==2 && st.contains("?")){
           System.out.println("YES");
           exit(0);
       }
       if(n==2 && !st.contains("?")){
           System.out.println("NO");
           exit(0);
       }
       if(st.contains("mm") || st.contains("cc") || st.contains("yy"))
       {
           System.out.println("NO");
           exit(0);
       }
       if(st.contains("??")){
            System.out.println("YES");
            exit(0);
       }
       if(st.charAt(0)=='?'||st.charAt(n-1)=='?'){
           System.out.println("YES");
           exit(0);
       }
       for(int j=1;j<n-1;j++){
           if(st.charAt(j)=='?' && st.charAt(j-1)==st.charAt(j+1)){
               System.out.println("YES");
               exit(0);
           }
           if(st.charAt(j)=='?' && st.charAt(j-1)!=st.charAt(j+1)){
               System.out.println("NO");
               exit(0);
           }
        }
    }
}


import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.math.*;
import java.text.*;
import java.util.*;

public class E {
	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter pw;

	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		//int qq = 1;
		int qq = Integer.MAX_VALUE;
		//int qq = readInt();
		for(int casenum = 1; casenum <= qq; casenum++) {
			int n = readInt();
			int m = readInt();
			int x = readInt();
			int y = readInt();
			int vx = readInt();
			int vy = readInt();
			if(vx == 0) {
				// vy
				if(x != 0 && x != n) {
					pw.println(-1);
				}
				else if(vy < 0) {
					pw.println(x + " " + 0);
				}
				else {
					pw.println(x + " " + m);
				}
				continue;
			}
			if(vy == 0) {
				if(y != 0 && y != m) {
					pw.println(-1);
				}
				else if(vx > 0) {
					pw.println(n + " " + y);
				}
				else {
					pw.println(0 + " " + y);
				}
				continue;
			}
			if((vx > 0) == (vy > 0)) {
				// y_sol = x_sol + (y - x)
				long xSol = solve(n, mod(-(y-x), m), m);
				if(xSol == -1) {
					pw.println(-1);
					continue;
				}
				long origGCD = gcd(n, m);
				if(vx > 0) {
					xSol -= m/origGCD;
					while(xSol * n <= x) {
						xSol += m/origGCD;
					}
				}
				else {
					xSol += m/origGCD;
					while(xSol * n >= x) {
						xSol -= m/origGCD;
					}
				}
				xSol *= n;
				long ySol = xSol + (y-x);
				pw.println(mod(xSol, 2*n) + " " + mod(ySol, 2*m));
			}
			else {
				// y_sol = -x_sol + (y + x)
				long xSol = solve(n, (y+x), m);
				if(xSol == -1) {
					pw.println(-1);
					continue;
				}
				long origGCD = gcd(n, m);
				if(vx > 0) {
					xSol -= m/origGCD;
					while(xSol * n <= x) {
						xSol += m/origGCD;
					}
				}
				else {
					xSol += m/origGCD;
					while(xSol * n >= x) {
						xSol -= m/origGCD;
					}
				}
				xSol *= n;
				long ySol = -xSol + (y+x);
				pw.println(mod(xSol, 2*n) + " " + mod(ySol, 2*m));
			}
		}
		pw.close();
	}

	public static long mod(long a, long m) {
		a %= m;
		if(a < 0) a += m;
		return a;
	}

	public static long gcd(long a, long b) {
		if(a==0) return b;
		if(b==0) return a;
		return gcd(b, a%b);
	}

	public static long solve(long a, long b, long m) {
		// return x such that a*x == b mod m, or -1 otherwise
		// note that on the original equation, for solution x_0, adding m / gcd(a, m) is always allowed
		b %= m;
		long g = gcd(Math.abs(a), Math.abs(m));
		if(b%g != 0) return -1;
		a /= g;
		b /= g;
		m /= g;
		long inv = modpow(a, phi(m)-1, m);
		return (inv*b)%m;
	}

	public static long phi(long n) {
		long r = n;
		for(int i = 2; i * i <= n; i++) {
			if(n%i==0) {
				r /= i;
				r *= i-1;
				while(n%i==0) {
					n /= i;
				}
			}
		}
		if(n > 1) {
			r /= n;
			r *= n-1;
		}
		return r;
	}

	public static long modpow(long b, long e, long m) {
		long r = 1;
		while(e > 0) {
			if(e%2==1) {
				r*=b;
				r%=m;
			}
			b*=b;
			b%=m;
			e/=2;
		}
		return r;
	}

	public static void exitImmediately() {
		pw.close();
		System.exit(0);
	}

	public static int readInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public static double readDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public static long readLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public static String nextLine() throws IOException {
		st = null;
		if(!br.ready()) {
			exitImmediately();
		}
		return br.readLine();
	}

	public static String nextToken() throws IOException {
		while(st == null || !st.hasMoreTokens()) {
			if(!br.ready()) {
				exitImmediately();
			}
			st = new StringTokenizer(br.readLine());
		}
		return st.nextToken();
	}
}


// Problem : E. The Holmes Children
// Contest : Codeforces - ICM Technex 2017 and Codeforces Round #400 (Div. 1 + Div. 2, combined)
// URL : https://codeforces.com/contest/776/problem/E
// Memory Limit : 256 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

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

public class a implements Runnable{

    public static void main(String[] args) {
        new Thread(null, new a(), "process", 1<<26).start();
    }
	public void run() {
		FastReader scan = new FastReader();
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		//PrintWriter out = new PrintWriter("file.out");
		Task solver = new Task();
		//int t = scan.nextInt();
		int t = 1;
		for(int i = 1; i <= t; i++) solver.solve(i, scan, out);
		out.close();
	}

	static class Task {
		static final int inf = Integer.MAX_VALUE;

		public void solve(int testNumber, FastReader sc, PrintWriter pw) {
			//CHECK FOR QUICKSORT TLE
			//***********************//
			//CHECK FOR INT OVERFLOW
			//***********************//
			long n = sc.nextLong();
			long k = sc.nextLong();
			k = Math.min(56, (k + 1)/ 2);
			for(int i = 0; i < k; i++) {
				n = phi(n);
			}
			pw.println(n % 1000000007);
		}
		long phi(long n)
		{
		    long result = n;
		    for (long p = 2; p * p <= n; ++p)
		    {
		        if (n % p == 0)
		        {
		            while (n % p == 0)
		                n /= p;
		            result -= result / p;
		        }
		    }
		    if (n > 1)
		        result -= result / n;
		    return result;
		}
	}
	static long binpow(long a, long b, long m) {
		a %= m;
		long res = 1;
		while (b > 0) {
			if ((b & 1) == 1)
				res = res * a % m;
			a = a * a % m;
			b >>= 1;
		}
		return res;
	}
	static void sort(int[] x){
		shuffle(x);
		Arrays.sort(x);
	}
	static void sort(long[] x){
		shuffle(x);
		Arrays.sort(x);
	}
	static class tup implements Comparable<tup>{
		int a, b;
		tup(int a,int b){
			this.a=a;
			this.b=b;
		}
		@Override
		public int compareTo(tup o){
			return Integer.compare(o.b,b);
		}
	}
	static void shuffle(int[] a) {
		Random get = new Random();
		for (int i = 0; i < a.length; i++) {
			int r = get.nextInt(i + 1);
			int temp = a[i];
			a[i] = a[r];
			a[r] = temp;
		}
	}

	static void shuffle(long[] a) {
		Random get = new Random();
		for (int i = 0; i < a.length; i++) {
			int r = get.nextInt(i + 1);
			long temp = a[i];
			a[i] = a[r];
			a[r] = temp;
		}
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

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

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

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

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int a1 = in.nextInt();
            int a2 = in.nextInt();
            int a3 = in.nextInt();
            int a4 = in.nextInt();
            int a5 = in.nextInt();
            int a6 = in.nextInt();

            long ans = (a1 + a2 + a3) * (a1 + a2 + a3) - a1 * a1 - a3 * a3 - a5 * a5;
            out.println(ans);

        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


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

public class AbilityToConvert {
    public static InputReader in;
    public static PrintWriter out;

    public static final int myMotivation = 0;
    public static final int MOD = (int) (1e9 + 7);
    public static final long INF = (long) (2e18);

    public static int len, n;
    public static char[] num;
    public static long[] memo;
    public static void main(String[] args) {
	in = new InputReader(System.in);
	out = new PrintWriter(System.out);

	n = in.nextInt();
	len = Integer.toString(n).length();
	num = ("$" + in.readString()).toCharArray();

	memo = new long[num.length];
	Arrays.fill(memo, -1);
	memo[0] = 0;
	solve(num.length - 1);
	out.println(memo[num.length - 1]);

	out.close();
    }

    public static void solve(int idx) {
	if(idx < 0 || memo[idx] != -1) {
	    return;
	}
	solve(idx - 1);
	long result = INF;
	for (int size = 1; size <= Math.min(len, idx); size++) {
	    long curr = Long.parseLong(new String(num, idx - size + 1, size));
	    solve(idx - size);
	    if(curr >= n || (size > 1 && num[idx - size + 1] == '0')) {
		continue;
	    }
	    result = Math.min(result, add(mul(memo[idx - size], n), curr));
	}
	memo[idx] = result;
    }

    public static long add(long a, long b) {
	return Math.min(a + b, INF);
    }

    public static long mul(long a, long b) {
	if(a == 0 || b == 0) {
	    return 0;
	}
	long m = a*b;
	if(m%a == 0 && m%b == 0) {
	    return Math.min(m, INF);
	}
	return INF;
    }

    static class Node implements Comparable<Node> {
	int next;
	int dist;

	public Node(int u, int v) {
	    this.next = u;
	    this.dist = v;
	}

	public void print() {
	    out.println(next + " " + dist + " ");
	}

	public int compareTo(Node that) {
	    return Integer.compare(this.next, that.next);
	}
    }

    static class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[8192];
	private int curChar, snumChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
	    this.stream = stream;
	}

	public int snext() {
	    if (snumChars == -1)
		throw new InputMismatchException();
	    if (curChar >= snumChars) {
		curChar = 0;
		try {
		    snumChars = stream.read(buf);
		} catch (IOException e) {
		    throw new InputMismatchException();
		}
		if (snumChars <= 0)
		    return -1;
	    }
	    return buf[curChar++];
	}

	public int nextInt() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    int res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

	public long nextLong() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    int sgn = 1;
	    if (c == '-') {
		sgn = -1;
		c = snext();
	    }
	    long res = 0;
	    do {
		if (c < '0' || c > '9')
		    throw new InputMismatchException();
		res *= 10;
		res += c - '0';
		c = snext();
	    } while (!isSpaceChar(c));
	    return res * sgn;
	}

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

	public String readString() {
	    int c = snext();
	    while (isSpaceChar(c))
		c = snext();
	    StringBuilder res = new StringBuilder();
	    do {
		res.appendCodePoint(c);
		c = snext();
	    } while (!isSpaceChar(c));
	    return res.toString();
	}

	public boolean isSpaceChar(int c) {
	    if (filter != null)
		return filter.isSpaceChar(c);
	    return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
	    public boolean isSpaceChar(int ch);
	}
    }
}