using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            String[] buffer = ReadLine();
            int n = int.Parse(buffer[0]), m = int.Parse(buffer[1]);
            long ans = 0;
            int min = Math.Min(n, m),max = Math.Max(m,n);
            for (int i = 1; i <= min; i++)
            {
                int mult = (i / 5) + 1;
                ans += (max - ((5 * mult) - i)) / 5;
                if(max>=(5*mult)-i)ans++;
            }
            print(ans);
        }
        public static String[] ReadLine()
        {
            return Console.ReadLine().Split(' ');
        }
        public static void print(long s)
        {
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Numerics;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solver
{
    public void Solve()
    {
        int n = ReadInt();
        int m = ReadInt();

        var a = new int[5];
        for (int i = 1; i <= n; i++)
            a[i % 5]++;
        var b = new int[5];
        for (int i = 1; i <= m; i++)
            b[i % 5]++;

        long ans = 1L * a[0] * b[0];
        for (int i = 1; i < 5; i++)
            ans += 1L * a[i] * b[5 - i];
        Write(ans);
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUG
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solver().Solve();
            //var thread = new Thread(new Solver().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0)currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++)matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++)ret[i][j] = matrix[j][i]; } return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++)lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array)writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++)ret[i] = new T(); return ret; }
    #endregion
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace Codeforces
{
    public class Program
    {
        public static void Main(string[] args)
        {
            long kq = 0,a,b;
		var s = Console.ReadLine ();
		a = Convert.ToInt64(s.Split (' ') [0]);
		b = Convert.ToInt64(s.Split (' ') [1]);
		if (a > b) {
			var temp = a;
			a = b;
			b = temp;
		}
		for (long i = 1; i <= a; i++) {
			kq += Dem (5 - (i % 5), b);
		}
		Console.WriteLine (kq);
        }
        static long Dem(long a, long b){
		long dem = 0;
		if (b >= a) {
			dem = 1;
			b -= a;
		} else
			return 0;
		return (dem + b / 5);
	}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			//string input3 = Console.ReadLine();
			//string input4 = Console.ReadLine();

			var inputs1 = input1.Split(new[] { ' ', '}', '{' , ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToList();

			int n = inputs1[0];
			int m = inputs1[1];

			var first = Enumerable.Range(1, n).Select(i => (long)i).ToList();
			var second = Enumerable.Range(1, m).Select(j => (long)j).ToList();

			var d0 = second.Count(j => j % 5 == 0);
			var d1 = second.Count(j => j % 5 == 1);
			var d2 = second.Count(j => j % 5 == 2);
			var d3 = second.Count(j => j % 5 == 3);
			var d4 = second.Count(j => j % 5 == 4);

			long count = 0;
			foreach (var i in first)
			{
				var d = i % 5;
				switch (d)
				{
					case 1:
						count += d4;
						continue;
					case 2:
						count += d3;
						continue;
					case 3:
						count += d2;
						continue;
					case 4:
						count += d1;
						continue;
					default:
						count += d0;
						continue;
				}
			}

			Console.WriteLine(count);
		}
	}
}

using System;
using System.Linq;
using System.Collections.Generic;

namespace trenvk
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] nm = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            long res = 0;

            for (int i = 1; i <= nm[0]; i++)
            {
                res += (nm[1] + i) / 5 - (i + 1) / 5;
                if ((i + 1) % 5 == 0) res++;

            }
            Console.Write(res);
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Globalization;

namespace CodeForces
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			int[] nums = Console.ReadLine ().Split (' ').Select (int.Parse).ToArray ();
			int n = nums [0];
			int m = nums [1];
			long result = (n / 5L) * (m / 5);
			result += ((n + 4L) / 5) * ((m + 1) / 5);
			result += ((n + 3L) / 5) * ((m + 2) / 5);
			result += ((n + 2L) / 5) * ((m + 3) / 5);
			result += ((n + 1L) / 5) * ((m + 4) / 5);
			Console.WriteLine (result);
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeforcesRound358A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] inp = Console.ReadLine().Split();

            int n = Convert.ToInt32(inp[0]);
            int m = Convert.ToInt32(inp[1]);
            int k = 0;

            long cnt = 0;

            for (int i = 1; i <= n; i++)
            {
                k = (i/5 + 1) * 5 - i;

                cnt += m / 5;
                if (m % 5 >= k)
                    cnt++;
            }

            Console.WriteLine(cnt);
            //inp = Console.ReadLine().Split();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A.Алёна_и_числа
{
    class Program
    {
        static void Main(string[] args)
        {
            var mm = Console.ReadLine().Split().Select(int.Parse).ToArray();
            long n, m;

            if (mm[0] < mm[1])
            {
                n = mm[0];
                m = mm[1];
            }
            else
            {
                n = mm[1];
                m = mm[0];
            }

            long s = 0;

            for (int i = 1; i <= n; i++)
                for (int j = 1; j <= m; j++)
                    if ((i + j) % 5 == 0)
                    {
                        s += (m + i % 5) / 5;
                        //Console.WriteLine("С {0} сумма равна = {1}", i, s);
                        break;
                    }

            Console.WriteLine(s);
            Console.ReadLine();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;

public static class A___Alyona_and_Numbers
{
    private static void Solve()
    {
        int n = ReadInt();
        int m = ReadInt();
        long[] nRemainderFrequency = new long[5];
        long[] mRemainderFrequency = new long[5];

        for (int i = 1; i <= n; i++)
        {
            int rem = i % 5;
            nRemainderFrequency[rem]++;
        }

        for (int j = 1; j <= m; j++)
        {
            int rem = j % 5;
            mRemainderFrequency[rem]++;
        }

        long totalPairs = nRemainderFrequency[0] * mRemainderFrequency[0];
        for (int i = 1; i <= 4; i++)
        {
            long iPairs = nRemainderFrequency[i] * mRemainderFrequency[5-i];
            totalPairs += iPairs;
        }

        Write(totalPairs);
    }

    #region Main

    private static TextReader reader;
    private static TextWriter writer;
    public static void Main()
    {
#if DEBUG
        //reader = new StreamReader("C:\\Users\\Axel\\Desktop\\input.txt");
        reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            Solve();
            //var thread = new Thread(new A___Alyona_and_Numbers().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string Read() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(Read()); }
    public static long ReadLong() { return long.Parse(Read()); }
    public static double ReadDouble() { return double.Parse(Read(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}

using System;
using System.Linq;

namespace TopCoder.Test.CodeForces.Batch682
{
    public class Program682A
    {
        public static void Main(string[] args)
        {
            int[] t = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
            int n = t[0];
            int m = t[1];

            ulong count = Simulate(n, m);

            Console.WriteLine(count);
        }

        public static ulong Simulate(int n, int m)
        {
            ulong count = 0;

            for (int i = 1; i <= n; i++)
                for (int j = 1; j <= m; j++)
                    if ((i + j) % 5 == 0)
                    {
                        ++count;
                        int x = (m - j) / 5;
                        count += (ulong)(m - j) / 5;
                        j += x * 5;
                    }

            return count;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExInCsharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string str1 = Console.ReadLine();
            int  m, n;
            long x=0;
            bool f = false;
            string[] str = str1.Split(' ');
            n = int.Parse(str[0]); m = int.Parse(str[1]);
            for (int i = 1; i <= n; i++ )
            {
                for (int j=1; j<=m; j++)
                {
                    if ((i+j)%5==0)
                    {
                        x += (m - j) / 5 + 1;
                        break;
                    }
                }

            }

            Console.WriteLine(x);

        }
    }
}

using System;
using System.Collections.Generic;
using System.IO.Pipes;
using System.Linq;
using System.Security.AccessControl;
using System.Text;

namespace codeforces
{
	class Program
	{
		public class User
		{
			public int c;

			public int r;
		}

		public class Point
		{
			public int x;

			public int y;
		}

		public class Comparer : IComparer<User>
		{
			public int Compare(User x, User y)
			{
				if (x.c < y.c || (x.c == y.c && x.r < y.r))
					return -1;
				return 1;
			}
		}

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

		public static void WriteYESNO(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string getString()
		{
			return Console.ReadLine();
		}

		public static List<int> getList()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static int Min(int x, int y)
		{
			return Math.Min(x, y);
		}

		public static int Max(int x, int y)
		{
			return Math.Max(x, y);
		}

		public static int Abs(int x)
		{
			return Math.Abs(x);
		}

		public static int getInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static bool Equal(int x, int y, int x1, int y1)
		{
			return x == x1 && y == y1;
		}

		public class Vertex
		{
			public List<int> edges;

			public int ct;

			public Vertex()
			{
				ct = 0;
				edges = new List<int>();
				for (var i = 0; i < 26; ++i)
					edges.Add(0);
			}
		}

		private static void Main(string[] args)
		{
/*			var input = new StreamReader("input.txt");
			var output = new StreamWriter("output.txt");*/
			var a = getList();
			long ans = 0;
			for (var i = 0; i < 5; ++i)
			{
				long t = a[0] / 5;
				t = t + ((a[0] % 5 >= i && i != 0) ? 1 : 0);
				long t1 = a[1] / 5;
				t1 = t1 + (a[1] % 5 >= (5 - i) ? 1 : 0);
				ans += t * t1;
			}
			Console.WriteLine(ans);
		}
	}
}

using System;
using System.IO;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

class Program
{

    //////////////////////////////////////////////////
    void Solution()
    {
        var x = ri;
        var y = ri;
        long res = 0;
        if (y < x)
        {
            var buf = y;
            y = x;
            x = buf;
        }
        for (int i = 1; i <= x; i++)
        {
            res += (y + (i % 5)) / 5;
        }
        wln(res);
    }
    //////////////////////////////////////////////////

    static void swap(ref object o1, ref object o2) { var o = o1; o1 = o2; o2 = o; }
    static void wln(object o = null) { Console.WriteLine(o); }
    static void wsp(object o) { Console.Write(o + " "); }
    static void wrt(object o) { Console.Write(o); }
    //Console.Write(string.Format(CultureInfo.InvariantCulture, "{0:F12}", o));

    static long gcd(long a, long b) { return (b != 0) ? gcd(b, a % b) : a; }
    static long lcm(long a, long b) { return a / gcd(a, b) * b; }

    int ri
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            int p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    long rl
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind;
            int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            long p = 0;
            while (_ind < _count && _str[_ind] != ' ') p = p * 10 + _str[_ind++] - '0';
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return p * sign;
        }
    }
    double rd
    {
        get
        {
            _read(); while (_str[_ind] == ' ') ++_ind; int sign = 1; if (_str[_ind] == '-') { sign = -1; ++_ind; }
            long p = 0, q = 1; while (_ind < _count && _str[_ind] != ' ' && _str[_ind] != '.') p = p * 10 + _str[_ind++] - '0';
            if (_ind < _count && _str[_ind] == '.') { ++_ind; while (_ind < _count && _str[_ind] != ' ') { p = p * 10 + _str[_ind++] - '0'; q *= 10; } }
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return (double)p / q * sign;
        }
    }
    string rs
    {
        get
        {
            _read(); while (_ind < _count && _str[_ind] == ' ') ++_ind;
            var tmp = _str.IndexOf(' ', _ind);
            if (tmp == -1) { _count = 0; _ind = 0; return _str.Substring(_ind); }
            var s = _str.Substring(_ind, tmp - _ind); _ind = tmp + 1;
            while (_ind < _count && _str[_ind] == ' ') ++_ind; return s;
        }
    }

    int[] ria(int n)
    {
        var res = new int[n];
        for (int k = 0; k < n;)
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                int p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    long[] rla(int n)
    {
        var res = new long[n];
        for (int k = 0; k < n;)
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0; while (i < m && s[i] != ' ') p = p * 10 + s[i++] - '0'; res[k++] = p * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    double[] rda(int n)
    {
        var res = new double[n];
        for (int k = 0; k < n;)
        {
            var s = Console.ReadLine(); var m = s.Length;
            for (int i = 0; i < m && k < n; ++i)
            {
                while (i < m && s[i] == ' ') ++i; if (i == m) break; int sign = 1; if (s[i] == '-') { sign = -1; ++i; }
                long p = 0, q = 1; while (i < m && s[i] != ' ' && s[i] != '.') p = p * 10 + s[i++] - '0';
                if (i < m && s[i] == '.') { ++i; while (i < m && s[i] != ' ') { p = p * 10 + s[i++] - '0'; q *= 10; } }
                res[k++] = (double)p / q * sign;
            }
        }
        _count = 0; _ind = 0; return res;
    }
    string[] rsa(int n) { var res = new string[n]; for (int k = 0; k < n; ++k) res[k] = Console.ReadLine(); _count = 0; _ind = 0; return res; }
    string _str = null; int _count = 0; int _ind = 0;
    void _read() { if (_ind == _count) { _str = Console.ReadLine(); _count = _str.Length; _ind = 0; } }
    static void Main() { new Program().Solution(); }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var data = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var n = data[0];
            var m = data[1];
            var cnt1 = new long[5];
            var cnt2 = new long[5];
            for (int i = 1; i <= n; i++)
                cnt1[i%5]++;
            for (int i = 1; i <= m; i++)
                cnt2[i % 5]++;

            long res = cnt1[0] * cnt2[0] +
                    cnt1[1] * cnt2[4] +
                    cnt1[2] * cnt2[3] +
                    cnt1[3] * cnt2[2] +
                    cnt1[4] * cnt2[1];
            Console.WriteLine(res);
        }
    }
}

using System;
    class Program
    {
        public static void Main(string[] args)
        {
            long n, m;
            {
                string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
                n = int.Parse(input[0]);
                m = int.Parse(input[1]);
            }
            long dff1 = n / 5, dff2 = m / 5;
            long result = dff1*dff2;
            for(long i = 1, j = 4, dff3 = n%5, dff4=m%5; i<5; j=5-++i)
             result += ((dff1 + (i <= dff3 ? 1 : 0)) * (dff2 + (j <= dff4 ? 1 : 0)));
            Console.WriteLine(result);
        }
    }

using System;

class A682 {
    static long F(int n, int k) {
        k = (k + 4) % 5 + 1;
        return (n + 5 - k) / 5;
    }

    public static void Main() {
        var line = Console.ReadLine().Split();
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        long answer = 0;
        for (int i = 0; i < 5; ++i) answer += F(n, i) * F(m, (5 - i) % 5);
        Console.WriteLine(answer);
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A.Alyona_and_Numbers
{
    class Program
    {

        static void Main(string[] args)
        {
           string input = Console.ReadLine();
           long a = int.Parse(input.Split()[0]);
           long b = int.Parse(input.Split()[1]);
           long min = Math.Min(a, b);
           long max = Math.Max(a, b);
            long collector=0;
           for (int i = 1; i <=min; i++)
           {
               for (int j =1; j <= 5; j++)
               {
                   if ((j + i) % 5 == 0 && j <= max)
                   { collector = collector + ((max - j) / 5) + 1; break; }
               }
           }
           Console.WriteLine(collector);
        }
    }
}

using System;
using System.IO;
using System.Text;

namespace Alyona_and_Numbers
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();
            int m = Next();

            long count = 0;

            long[] cn = Counts(n, 5);
            long[] cm = Counts(m, 5);

            for (int i = 0; i < cn.Length; i++)
            {
                count += cn[i]*cm[(5 - i)%5];
            }

            writer.WriteLine(count);
            writer.Flush();
        }

        private static long[] Counts(int n, int div)
        {
            var ans = new long[div];

            for (int i = 0; i < div; i++)
            {
                ans[i] = n/div;
                if (n%div >= i)
                    ans[i]++;
            }
            ans[0]--;

            return ans;
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApplication5
{

    class Program
    {
        static void Main(string[] args)
        {
            A();
        }

        static void A()
        {
            var firstModFiveArray = new long[5];
            var secondModFiveArray = new long[5];
            var data = Console.ReadLine()
                .Split(new[] { ' ' })
                .Select(int.Parse)
                .ToArray();
            int n = data[0], m = data[1];
            for (int i = 1; i <= Math.Min(n, m); i++)
            {
                firstModFiveArray[i % 5]++;
                secondModFiveArray[i % 5]++;
            }
            long[] temp = null;
            if (n > m)
                temp = firstModFiveArray;
            else if (m > n)
                temp = secondModFiveArray;
            if (temp != null)
                for (int i = Math.Min(n, m) + 1; i <= Math.Max(n, m); i++)
                    temp[i % 5]++;
            long res = 0;
            res += firstModFiveArray[1] * secondModFiveArray[4];
            res += firstModFiveArray[2] * secondModFiveArray[3];
            res += firstModFiveArray[3] * secondModFiveArray[2];
            res += firstModFiveArray[4] * secondModFiveArray[1];
            res += firstModFiveArray[0] * secondModFiveArray[0];
            Console.WriteLine(res);
        }
    }
}

using System;
namespace _682A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            long n = long.Parse(input[0]), m = long.Parse(input[1]);
            long[] cntN = new long[5], cntM = new long[5];
            for (long i = 0; i < 5; i++)
            {
                cntN[i] = n / 5;
                cntM[i] = m / 5;
            }
            for (long i = 1; i <= n % 5; i++)
                cntN[i]++;
            for (long i = 1; i <= m % 5; i++)
                cntM[i]++;
            long result = 0;
            for (long i = 0; i < 5; i++)
                result += cntN[i] * cntM[(5 - i) % 5];
            Console.WriteLine(result);
        }
    }
}

using System;
using System.Globalization;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;

namespace Codeforces
{
    class Program : ProgramBase
    {
        private const long commonMod = 1000000007;

        static void Main(string[] args)
        {
            var p = new Program();
            var x = p.Get();
            p.Out(x);
        }

        object Get()
        {
            checked
            {
                var n = ReadIntToken();
                var m = ReadIntToken();
                var first = new int[5];
                var sec = new int[5];
                for (int i = 0; i < 5; i++)
                {
                    first[i] = n / 5;
                }
                for (int i = 1; i <= n % 5; i++)
                {
                    first[i]++;
                }
                long res = 0l;
                for (int i = 1; i <= m; i++)
                {
                    var rem = i % 5;
                    res += first[(5 - rem) % 5];
                }
                return res;
            }
        }

        public static class Struct
        {
            public static Pair<T1, T2> Create<T1,T2>(T1 item1, T2 item2)
            {
                return new Pair<T1, T2> { Item1 = item1, Item2 = item2 };
            }
        }

        public struct Pair<T1, T2>
        {
            public T1 Item1 { get; set; }
            public T2 Item2 { get; set; }
        }

        class Automata
        {
            bool[] terminals;
            public int sigma;
            public int len;
            public int[,] jumps;

            public void Create()
            {
                var a = ReadInts();
                len = a[0];
                sigma = a[2];
                var ts = ReadInts();
                terminals = new bool[len];
                for (int i = 0; i < ts.Length; i++)
                    terminals[ts[i]] = true;
                jumps = new int[len, sigma];
                for (int i = 0; i < len * sigma; i++)
                {
                    var b = Console.ReadLine().Split(' ');
                    jumps[Convert.ToInt32(b[0]), b[1][0] - 'a'] = Convert.ToInt32(b[2]);
                }
            }
            protected int[] ReadInts()
            {
                return Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
            }

            public bool IsTerminal(int s)
            {
                return terminals[s];
            }
        }
    }

    abstract class ProgramBase
    {
        bool? prod = null;
        StreamReader f;
        Queue<string> tokens;
        protected string FileName { private get; set; }

        protected string Read()
        {
            if (f == null)
                f = string.IsNullOrEmpty(FileName)
                    ? new StreamReader(Console.OpenStandardInput())
                    : new StreamReader((GetProd() ? "" : "c:\\dev\\") + FileName);
            return f.ReadLine();
        }

        protected int ReadInt()
        {
            return int.Parse(Read());
        }

        protected int ReadIntToken()
        {
            if (tokens == null || tokens.Count == 0)
                tokens = new Queue<string>(Read().Split(' '));
            return int.Parse(tokens.Dequeue());
        }

        protected int[] ReadInts()
        {
            var tokens = Read().Split(' ');
            var result = new int[tokens.Length];
            for (int i = 0; i < tokens.Length; i++)
                result[i] = int.Parse(tokens[i]);
            return result;
        }

        protected long ReadLongToken()
        {
            if (tokens == null || tokens.Count == 0)
                tokens = new Queue<string>(Read().Split(' '));
            return long.Parse(tokens.Dequeue());
        }

        protected long ReadLong()
        {
            return Convert.ToInt64(Read());
        }

        protected long[] ReadLongs()
        {
            var tokens = Read().Split(' ');
            var result = new long[tokens.Length];
            for (int i = 0; i < tokens.Length; i++)
                result[i] = long.Parse(tokens[i]);
            return result;
        }

        public void Out(object r)
        {
            if (string.IsNullOrEmpty(FileName))
                Console.WriteLine(r);
            else if (GetProd())
                File.WriteAllText(FileName, r.ToString());
            else
                Console.WriteLine(r);
        }

        private bool GetProd()
        {

            if (!prod.HasValue)
                try
                {
                    prod = Environment.MachineName != "RENADEEN-W7";
                }
                catch (Exception)
                {
                    prod = true;
                }
            return prod.Value;
        }
    }

    public static class Huj
    {
        public static T MinBy<T>(this IEnumerable<T> source, Func<T, double> func) where T : class
        {
            T result = null;
            var min = double.MaxValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (min > current)
                {
                    min = current;
                    result = item;
                }
            }
            return result;
        }

        public static T MaxBy<T>(this IEnumerable<T> source, Func<T, double> func, T defaultValue = default(T))
        {
            T result = defaultValue;
            var max = double.MinValue;
            foreach (var item in source)
            {
                var current = func(item);
                if (max < current)
                {
                    max = current;
                    result = item;
                }
            }
            return result;
        }

        public static string JoinStrings(this IEnumerable<string> source, string delimeter)
        {
            return string.Join(delimeter, source.ToArray());
        }

        public static string JoinStrings(this IEnumerable<int> source, string delimeter)
        {
            return source.Select(x => x.ToString()).JoinStrings(delimeter);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class MainClass
{
	public static void Main (string[] args)
	{
		//System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo ("en-US");
		string [] s=Console.ReadLine().Split(' ');
		int n = int.Parse (s[0]);
		int m = int.Parse (s[1]);
		long ans = 0;
		for (int i = 1; i <= n; i++) {
			ans += (m + i) / 5 - (i + 1) / 5;
			if ((i + 1) % 5 == 0)
				ans++;
		}
		Console.WriteLine (ans);

	}
};

// The future is not something we enter.
// The future is something we create.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace Codeforces
{
    class Program
    {
        static StreamReader reader;
        static StreamWriter writer;
        static Random rand = new Random(0);

        static void Main(string[] args)
        {

            //#if DEBUG
            reader = new StreamReader(Console.OpenStandardInput(32768), Encoding.ASCII, false, 32768);
            writer = new StreamWriter(Console.OpenStandardOutput(32768), Encoding.ASCII, 32768);
            //#else
            //            StreamReader streamReader = new StreamReader(Console.OpenStandardInput(32768), Encoding.ASCII, false, 32768);
            //            StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(32768), Encoding.ASCII, 32768);
            //#endif
            InputReader input = new InputReader(reader);

            int n = input.NextInt();
            int m = input.NextInt();
            long[,] hash = new long[2, 5];
            for (int i = 1; i <= n; i++)
            {
                hash[0, i % 5]++;
            }
            for (int i = 1; i <= m; i++)
            {
                hash[1, i % 5]++;
            }
            long sum = hash[0, 0] * hash[1, 0];
            for (int i = 1; i < 5; i++)
            {
                sum += hash[0, i] * hash[1, 5 - i];
            }
            writer.WriteLine(sum);

#if DEBUG
                Console.BackgroundColor = ConsoleColor.White;
            Console.ForegroundColor = ConsoleColor.Black;
#endif
            writer.Flush();
            writer.Close();
            reader.Close();
        }

    }

    class Pair
    {
        public int x, y;

        public Pair(int x, int y)
        {
            this.x = x;
            this.y = y;
        }
    }

    // this class is copy
    class InputReader
    {
        private char[] _inbuf;
        private int _lenbuf = 0, _ptrbuf = 0;
        private StreamReader _reader;

        public InputReader(StreamReader reader)
        {
            _reader = reader;
            _inbuf = new char[1024];
            _lenbuf = 0;
            _ptrbuf = 0;
        }

        private int ReadByte()
        {
            if (_lenbuf == -1)
                throw new Exception();
            if (_ptrbuf >= _lenbuf)
            {
                _ptrbuf = 0;
                try
                {
                    _lenbuf = _reader.Read(_inbuf, 0, 1024);
                }
                catch (IOException e)
                {
                    throw e;
                }
                if (_lenbuf <= 0)
                    return -1;
            }
            return _inbuf[_ptrbuf++];
        }

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

        private int Skip()
        {
            int b;
            while ((b = ReadByte()) != -1 && IsSpaceChar(b)) ;
            return b;
        }

        public int NextInt()
        {
            return int.Parse(this.Next());
        }

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

        public long NextLong()
        {
            return long.Parse(this.Next());
        }

        public string Next()
        {
            var b = Skip();
            var sb = new StringBuilder();
            while (!(IsSpaceChar(b)))
            {
                sb.Append((char)b);
                b = ReadByte();
            }
            return sb.ToString();
        }

        public double NextDouble()
        {
            return double.Parse(Next(), CultureInfo.InvariantCulture);
        }

        internal long[] NextLongArray(long n)
        {
            long[] a = new long[(int)n];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = NextLong();
            }
            return a;
        }

        internal double[] NextDoubleArray(int n)
        {
            double[] a = new double[n];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = NextDouble();
            }
            return a;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CF {
    class Program {
        static void solve() {
            string[] s = Console.ReadLine().Split(' ');
            long n = long.Parse(s[0]), m = long.Parse(s[1]);
            long[] a = new long[5];
            long[] b = new long[5];
            for (int i = 0; i < 5; i++) {
                a[i] = n / 5;
                b[i] = m / 5;
            }
            for (int i = 1; i <= n % 5; i++) {
                a[i]++;
            }
            for (int i = 1; i <= m % 5; i++) {
                b[i]++;
            }
            Console.WriteLine(a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
        }

        static void Main(string[] args) {

            solve();

        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace CF317
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var sr = new InputReader(Console.In);
            //var sr = new InputReader(new StreamReader("input.txt"));
            var task = new Task();
            using (var sw = Console.Out)
            //using (var sw = new StreamWriter("output.txt"))
            {
                task.Solve(sr, sw);
                //Console.ReadKey();
            }
        }
    }

    internal class Task
    {
        public void Solve(InputReader sr, TextWriter sw)
        {
            var input = sr.ReadArray(Int32.Parse);
            var n = input[0];
            var m = input[1];
            var count = 0L;
            for (var i = 1; i <= n; i++) {
                    count += (m + i) / 5L - i/5;
            }

            sw.WriteLine(count);
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(NextString());
    }

    public long NextInt64()
    {
        return Int64.Parse(NextString());
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();
            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Training
{
    class Program
    {
        static void Main(string[] args)
        {
            var tmp = Console.ReadLine().Split(' ');
            int a = int.Parse(tmp[0]);
            int b = int.Parse(tmp[1]);

            long sum = 0;
            for (int i = 1; i <= b; i++)
            {
                sum += (a + i) / 5 - (i + 1) / 5;
                if ((i + 1) % 5 == 0)
                    sum++;
            }

            Console.WriteLine(sum);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication24
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
           long n = Convert.ToInt64(s[0]);
            long m = Convert.ToInt64(s[1]);
            long[] mas = new long[5];
            long[] mas1 = new long[5];
            for (int i = 1; i < n+1; i++)
            {
                mas[i % 5]++;
            }
            for (int i = 1; i < m+1; i++)
            {
                mas1[i % 5]++;
            }

            long x = (mas[0] * mas1[0] + mas[1] * mas1[4] + mas[2] * mas1[3] + mas[3] * mas1[2] + mas[4] * mas1[1]);
            Console.WriteLine(x);

        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2018_08_23_alyona_and_numbers
//http://codeforces.com/problemset/problem/682/A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] nm = Console.ReadLine().Split(' ');
            int n = int.Parse(nm[0]);
            int m = int.Parse(nm[1]);

            long modfive = 0;

            int countFive = n / 5;
            int residue = n % 5;

            modfive = Modfive(5,countFive, m) + Modfive(residue,1, m);
            Console.WriteLine(modfive);
        }
        static long Modfive(int c,int r, int m)
        {
            int help = 0;
            long modfive = 0;
            for (int i = 1; i <= c; i++)
            {
                help = 5 - i;
                if (help == 0)
                    help = help + 5;

                for (int j = help; j <= m; j = j + 5)
                    modfive++;
            }
            return modfive*r;
        }
    }
}

using System;

namespace _682A
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                long toplam = 0;
                int x = 0;
                int y = 0;
                long sayac = 0;
                long[] xy = new long[2];
                foreach (string str in Console.ReadLine().Split(' '))
                {
                    xy[sayac] = long.Parse(str);
                    sayac++;
                }
                sayac = 0;
                for (int i = 1; i <= xy[0]; i++)
                {
                    if (i >= 5)
                        sayac += (xy[1] + i) / 5 - (i/5);
                    else
                        sayac += (xy[1] + i) / 5;
                }
                Console.Write(sayac);
                Console.ReadKey();
            }
            catch { }
        }

    }
}

using System;
class Program
{
    static void Main()
    {
        long[] a = { 0, 0, 0, 0, 0 };
        long[] b = { 0, 0, 0, 0, 0 };
        long[] nm = Array.ConvertAll(Console.ReadLine().Split(),long.Parse);
        for (int i = 1; i <= nm[0]; i++)
            a[i % 5]++;
        for (int i = 1; i <= nm[1]; i++)
            b[i % 5]++;
        Console.WriteLine(a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
    }
}

using System;

namespace CSharp
{
    public class _682A
    {
        public static void Main()
        {
            string[] tokens = Console.ReadLine().Split();

            long n = int.Parse(tokens[0]);
            long m = int.Parse(tokens[1]);

            long count = 0;

            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < 5; j++)
                {
                    if ((i + j) % 5 == 0)
                    {
                        count += ((n + j) / 5) * ((m + i) / 5);
                    }
                }
            }

            Console.WriteLine(count);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] buffer = Console.ReadLine().Split(' ');
            long a = int.Parse(buffer[0]);
            long b = int.Parse(buffer[1]);
            long index = b / 5;
            long rest = b % 5;
            long summ = a * index;
            long indexA = a / 5;
            summ += rest * indexA;
            for (long i = (5 * indexA) + 1; i <= a; i++)
            {
                for (long j = (5*index)+1; j <= b; j++)
                {
                    if ((i + j) % 5 == 0)
                    {
                        summ++;
                    }
                }
            }
            Console.WriteLine(summ);
        }
    }
}

using System;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            int n, m;
            string[] str = Console.ReadLine().Split();
            n = Convert.ToInt32(str[0]);
            m = Convert.ToInt32(str[1]);
            long res = 0;
            for (int i = 1; i <= n; i++)
            {
                if (i%5 == 0)
                {
                    res += m / 5;
                }
                else
                {
                    res += m / 5;
                    if (5-i%5<=m%5)
                    {
                        res += 1;
                    }
                }
            }
            Console.WriteLine(res);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            int x;
            int y;
            long count = 0;

            string[] tokens = Console.ReadLine().Split();
            x = int.Parse(tokens[0]);
            y = int.Parse(tokens[1]);

            for (int i = 1; i <= x; i++)
            {
                count += (y + (i % 5)) / 5;
            }
            System.Console.WriteLine(count);
        }
    }
}

using System;
using System.Collections.Generic;
using System.IO;

namespace prA {
    class Program {
#if ONLINE_JUDGE
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024 * 10), System.Text.Encoding.ASCII, false, 1024 * 10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024 * 10), System.Text.Encoding.ASCII, 1024 * 10);
#else
        private static readonly StreamWriter writer = new StreamWriter(@"..\..\output");
        private static readonly StreamReader reader = new StreamReader(@"..\..\input");
#endif

        static void Main(string[] args) {
            int n = Next();
            int m = Next();
            ulong ans = 0;
            int[] nn = new int[5];
            int[] mm = new int[5];
            for (int i = 1; i < 5; i++) {
                nn[i] = n / 5 + (n % 5 >= i ? 1 : 0);
                mm[i] = m / 5 + (m % 5 >= i ? 1 : 0);
            }
            nn[0] = n / 5;
            mm[0] = m / 5;
            for (int i = 0; i < 5; i++) {
                ans += (ulong) nn[i] * (ulong) mm[(5 - i) % 5];
            }
            writer.Write(ans);
            writer.Flush();
#if !ONLINE_JUDGE
            writer.Close();
#endif
        }
        private static int Next() {
            int c;
            int res = 0;
            do {
                c = reader.Read();
                if(c == -1)
                    return res;
            } while(c != '-' && (c < '0' || c > '9'));
            int sign = 1;
            if(c == '-') {
                sign = -1;
                c = reader.Read();
            }
            res = c - '0';
            while(true) {
                c = reader.Read();
                if(c < '0' || c > '9')
                    return res * sign;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;

namespace Nasharpiyebigint
{
    class Program
    {
        static void Main(string[] args)
        {
            BigInteger m, n, r, s = 0;
            string[] arr = Console.ReadLine().Split(' ');
            m = BigInteger.Parse(arr[0]);
            n = BigInteger.Parse(arr[1]);
            if (m < n)
            {
                r = m;
                m = n;
                n = r;
            }
            for (BigInteger i = 1; i <= n; i++)
            {
                s += (m + i) / 5 - i / 5;
            }
            Console.Write(s);
            //Console.Read();
        }
    }
}

using System;
using System.Linq;
namespace Alyona_and_Numbers
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            long[] a = new long[5];
            long[] b = new long[5];
            for (int i = 1; i <=input[0]; i++)
            {
                a[i % 5]++;
            }

            for (int i = 1; i <= input[1]; i++)
            {
                b[i % 5]++;
            }
            Console.WriteLine(a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
        }
    }
}

using System;
class Program
{
    static void Main()
    {
        int[] a = { 0, 0, 0, 0, 0 };
        int[] b = { 0, 0, 0, 0, 0 };
        int[] nm = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
        for (int i = 1; i <= nm[0]; i++)
            a[i % 5]++;
        for (int i = 1; i <= nm[1]; i++)
            b[i % 5]++;
        Console.WriteLine(a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] buffer = Console.ReadLine().Split(' ');
            int a = int.Parse(buffer[0]);
            int b = int.Parse(buffer[1]);
            int index = b / 5;
            long summ = a * index;
            for (int i = 1; i <= a; i++)
            {
                for (int j = (5*index)+1; j <= b; j++)
                {
                    if ((i + j) % 5 == 0)
                    {
                        summ++;
                    }
                }
            }
            Console.WriteLine(summ);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] buffer = Console.ReadLine().Split(' ');
            int a = int.Parse(buffer[0]);
            int b = int.Parse(buffer[1]);
            int index = b / 5;
            int rest = b % 5;
            long summ = a * index;
            int indexA = a / 5;
            summ += rest * indexA;
            for (int i = (5 * indexA) + 1; i <= a; i++)
            {
                for (int j = (5*index)+1; j <= b; j++)
                {
                    if ((i + j) % 5 == 0)
                    {
                        summ++;
                    }
                }
            }
            Console.WriteLine(summ);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] buffer = Console.ReadLine().Split(' ');
            int a = int.Parse(buffer[0]);
            int b = int.Parse(buffer[1]);
            int index = b / 5;
            int summ = a * index;
            for (int i = 1; i <= a; i++)
            {
                for (int j = (5*index)+1; j <= b; j++)
                {
                    if ((i + j) % 5 == 0)
                    {
                        summ++;
                    }
                }
            }
            Console.WriteLine(summ);
        }
    }
}

using System;
using System.Linq;
namespace Alyona_and_Numbers
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
            int[] a = new int[5];
            int[] b = new int[5];
            for (int i = 1; i <=input[0]; i++)
            {
                a[i % 5]++;
            }

            for (int i = 1; i <= input[1]; i++)
            {
                b[i % 5]++;
            }
            Console.WriteLine(a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			//string input3 = Console.ReadLine();
			//string input4 = Console.ReadLine();

			var inputs1 = input1.Split(new[] { ' ', '}', '{' , ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToList();

			int n = inputs1[0];
			int m = inputs1[1];

			var first = Enumerable.Range(1, n).ToList();
			var second = Enumerable.Range(1, m).ToList();

			int count = 0;
			count += first.Count(i => i % 5 == 0) * second.Count(j => j % 5 == 0);
			count += first.Count(i => i % 5 == 1) * second.Count(j => j % 5 == 4);
			count += first.Count(i => i % 5 == 2) * second.Count(j => j % 5 == 3);
			count += first.Count(i => i % 5 == 3) * second.Count(j => j % 5 == 2);
			count += first.Count(i => i % 5 == 4) * second.Count(j => j % 5 == 1);

			Console.WriteLine(count);
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;

namespace Codeforces
{
	class Program
	{
		static void Main(string[] args)
		{
			string input1 = Console.ReadLine();
			//string input2 = Console.ReadLine();

			//string input3 = Console.ReadLine();
			//string input4 = Console.ReadLine();

			var inputs1 = input1.Split(new[] { ' ', '}', '{' , ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
			//var inputs2 = input2.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToList();

			int n = inputs1[0];
			int m = inputs1[1];

			var first = Enumerable.Range(1, n).Select(i => (long)i).ToList();
			var second = Enumerable.Range(1, m).Select(j => (long)j).ToList();

			var d0 = second.Count(j => j % 5 == 0);
			var d1 = second.Count(j => j % 5 == 1);
			var d2 = second.Count(j => j % 5 == 2);
			var d3 = second.Count(j => j % 5 == 3);
			var d4 = second.Count(j => j % 5 == 4);

			long count = 0;
			foreach (var i in first)
			{
				var d = i % 5;
				switch (d)
				{
					case 1:
						count += d1;
						continue;
					case 2:
						count += d2;
						continue;
					case 3:
						count += d3;
						continue;
					case 4:
						count += d4;
						continue;
					default:
						count += d0;
						continue;
				}
			}

			Console.WriteLine(count);
		}
	}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            var data = Console.ReadLine().Split().Select(int.Parse).ToArray();
            var n = data[0];
            var m = data[1];
            var cnt1 = new int[5];
            var cnt2 = new int[5];
            for (int i = 1; i <= n; i++)
            {
                cnt1[i%5]++;
            }
            for (int i = 1; i <= m; i++)
            {
                cnt2[i % 5]++;
            }

            var res = cnt1[0] * cnt2[0] +
                cnt1[1] * cnt2[4] +
                cnt1[2] * cnt2[3] +
                cnt1[3] * cnt2[2] +
                cnt1[4] * cnt2[1];
            Console.WriteLine(res);
        }
    }
}

using System;
class Program
    {
        public static void Main(string[] args)
        {
            int n, m;
            {
                string[] input = Console.In.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
                n = int.Parse(input[0]);
                m = int.Parse(input[1]);
            }
            int dff1 = n / 5, dff2 = m / 5;
            int result = dff1*dff2;
            for(int i = 1, j = 4, dff3 = n%5, dff4=m%5; i<5; j=5-++i)
             result += ((dff1 + (i <= dff3 ? 1 : 0)) * (dff2 + (j <= dff4 ? 1 : 0)));
            Console.WriteLine(result);
        }
    }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A.Alyona_and_Numbers
{
    class Program
    {

        static void Main(string[] args)
        {
           string input = Console.ReadLine();
           int a = int.Parse(input.Split()[0]);
           int b = int.Parse(input.Split()[1]);
           int min = Math.Min(a, b);
           int max = Math.Max(a, b);
            int collector=0;
           for (int i = 1; i <=min; i++)
           {
               for (int j =1; j <= 5; j++)
               {
                   if ((j + i) % 5 == 0 && j <= max)
                   { collector = collector + ((max - j) / 5) + 1; break; }
               }
           }
           Console.WriteLine(collector);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class MainClass
{
	public static void Main (string[] args)
	{
		//System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo ("en-US");
		string [] s=Console.ReadLine().Split(' ');
		int n = int.Parse (s[0]);
		int m = int.Parse (s[1]);
		long ans = 0;
		for (int i = 1; i <= n; i++) {
			ans += (m + i) / 5 - (i + 1) / 5;
			if ((i + 1) % 5 == 0)
				ans++;
		}

	}
};

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CF {
    class Program {
        static void solve() {
            string[] s = Console.ReadLine().Split(' ');
            int n = int.Parse(s[0]), m = int.Parse(s[1]);
            int[] a = new int[5];
            int[] b = new int[5];
            for (int i = 0; i < 5; i++) {
                a[i] = n / 5;
                b[i] = m / 5;
            }
            for (int i = 1; i <= n % 5; i++) {
                a[i]++;
            }
            for (int i = 1; i <= m % 5; i++) {
                b[i]++;
            }
            Console.WriteLine(a[0] * b[0] + a[1] * b[4] + a[2] * b[3] + a[3] * b[2] + a[4] * b[1]);
        }

        static void Main(string[] args) {

            solve();

        }
    }
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace CF317
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var sr = new InputReader(Console.In);
            //var sr = new InputReader(new StreamReader("input.txt"));
            var task = new Task();
            using (var sw = Console.Out)
            //using (var sw = new StreamWriter("output.txt"))
            {
                task.Solve(sr, sw);
                //Console.ReadKey();
            }
        }
    }

    internal class Task
    {
        public void Solve(InputReader sr, TextWriter sw)
        {
            var input = sr.ReadArray(Int32.Parse);
            var n = input[0];
            var m = input[1];
            sw.WriteLine(((long)n*m)/5L);
        }
    }
}

internal class InputReader : IDisposable
{
    private bool isDispose;
    private readonly TextReader sr;

    public InputReader(TextReader stream)
    {
        sr = stream;
    }

    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }

    public string NextString()
    {
        var result = sr.ReadLine();
        return result;
    }

    public int NextInt32()
    {
        return Int32.Parse(NextString());
    }

    public long NextInt64()
    {
        return Int64.Parse(NextString());
    }

    public string[] NextSplitStrings()
    {
        return NextString()
            .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }

    public T[] ReadArray<T>(Func<string, CultureInfo, T> func)
    {
        return NextSplitStrings()
            .Select(s => func(s, CultureInfo.InvariantCulture))
            .ToArray();
    }

    public T[] ReadArrayFromString<T>(Func<string, CultureInfo, T> func, string str)
    {
        return
            str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
                .Select(s => func(s, CultureInfo.InvariantCulture))
                .ToArray();
    }

    protected void Dispose(bool dispose)
    {
        if (!isDispose)
        {
            if (dispose)
                sr.Close();
            isDispose = true;
        }
    }

    ~InputReader()
    {
        Dispose(false);
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Training
{
    class Program
    {
        static void Main(string[] args)
        {
            var tmp = Console.ReadLine().Split(' ');
            int a = int.Parse(tmp[0]);
            int b = int.Parse(tmp[1]);

            var sum = 0;
            for (int i = 1; i <= b; i++)
            {
                sum += (a + i) / 5 - (i + 1) / 5;
                if ((i + 1) % 5 == 0)
                    sum++;
            }

            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2018_08_23_alyona_and_numbers
//http://codeforces.com/problemset/problem/682/A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] nm = Console.ReadLine().Split(' ');
            int n = int.Parse(nm[0]);
            int m = int.Parse(nm[1]);

            int modfive = 0;

            int countFive = n / 5;
            int residue = n % 5;

            modfive = Modfive(5,countFive, m) + Modfive(residue,1, m);
            Console.WriteLine(modfive);
        }
        static int Modfive(int c,int r, int m)
        {
            int help = 0;
            int modfive = 0;
            for (int i = 1; i <= c; i++)
            {
                help = 5 - i;
                if (help == 0)
                    help = help + 5;

                for (int j = help; j <= m; j = j + 5)
                    modfive++;
            }
            return modfive*r;
        }
    }
}

using System;

namespace _682A
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                int x = 0;
                int y = 0;
                int sayac = 0;
                long[] xy = new long[2];
                foreach (string str in Console.ReadLine().Split(' '))
                {
                    xy[sayac] = long.Parse(str);
                    sayac++;
                }
                sayac = 0;
                if ((xy[0] * xy[1]) % 5 == 4)
                    Console.Write((xy[0] * xy[1]) / 5 + 1);
                else if ((xy[0] * xy[1]) % 5 == 1)
                    Console.Write((xy[0] * xy[1]) / 5 - 1);
                else
                    Console.Write((xy[0] * xy[1]) / 5);

                Console.ReadKey();
            }
            catch { }
        }

    }
}

using System;

namespace _682A
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                int x = 0;
                int y = 0;
                int sayac = 0;
                int[] xy = new int[2];
                foreach (string str in Console.ReadLine().Split(' '))
                {
                    xy[sayac] = int.Parse(str);
                    sayac++;
                }
                sayac = 0;
                if ((xy[0] * xy[1]) % 5 == 4)
                    Console.Write((xy[0] * xy[1]) / 5 + 1);
                else
                    Console.Write((xy[0] * xy[1]) / 5);

                Console.ReadKey();
            }
            catch { }
        }

    }
}

using System;

namespace _682A
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                int x = 0;
                int y = 0;
                int sayac = 0;
                long[] xy = new long[2];
                foreach (string str in Console.ReadLine().Split(' '))
                {
                    xy[sayac] = long.Parse(str);
                    sayac++;
                }
                sayac = 0;
                if ((xy[0] * xy[1]) % 5 == 4)
                    Console.Write((xy[0] * xy[1]) / 5 + 1);
                else
                    Console.Write((xy[0] * xy[1]) / 5);

                Console.ReadKey();
            }
            catch { }
        }

    }
}

using System;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            int n, m;
            string[] str = Console.ReadLine().Split();
            n = Convert.ToInt32(str[0]);
            m = Convert.ToInt32(str[1]);
            long res = 0;
            for (int i = 1; i <= n; i++)
            {
                if (i%5 == 0)
                {
                    res += m / 5;
                }
                else
                {
                    res += m / 5;
                    if (i%5<m%5)
                    {
                        res += 1;
                    }
                }
            }
            Console.WriteLine(res);
        }
    }
}

using System;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            int n, m;
            string[] str = Console.ReadLine().Split();
            n = Convert.ToInt32(str[0]);
            m = Convert.ToInt32(str[1]);
            long res = 0;
            for (int i = 1; i <= n; i++)
            {
                if (i%5 == 0)
                {
                    res += m / 5;
                }
                else
                {
                    res += m / 5;
                    if (i%5<=m%5)
                    {
                        res += 1;
                    }
                }
            }
            Console.WriteLine(res);
        }
    }
}

using System;
using System.Linq;

namespace ConsoleApplication1
{
    class Program
    {

        static void Main(string[] args)
        {
            int n, m;
            string[] str = Console.ReadLine().Split();
            n = Convert.ToInt32(str[0]);
            m = Convert.ToInt32(str[1]);
            long res = 0;
            for (int i = 1; i <= n; i++)
            {
                if (i%5 == 0)
                {
                    res += m / 5;
                }
                else
                {
                    res += (m + 5 - i % 5) / 5;
                }
            }
            Console.WriteLine(res);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            String[] buffer = ReadLine();
            int n = int.Parse(buffer[0]), m = int.Parse(buffer[1]);
            long ans = 0;
            int min = Math.Min(n, m),max = Math.Max(m,n);
            for (int i = 1; i <= min; i++)
            {
                int mult = (i / 5) + 1;
                ans += (max - ((5 * mult) - i)) / 5;
                ans++;
            }
            print(ans);
        }
        public static String[] ReadLine()
        {
            return Console.ReadLine().Split(' ');
        }
        public static void print(long s)
        {
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            String[] buffer = ReadLine();
            int n = int.Parse(buffer[0]), m = int.Parse(buffer[1]);
            long ans = 0;
            int min = Math.Min(n, m),max = Math.Max(m,n);
            for (int i = 1; i <= min; i++)
            {
                int mult = (i / 5) + 1;
                ans += (max - ((5 * mult) - i)) / 5;
                if(max>=(5*mult))ans++;
            }
            print(ans);
        }
        public static String[] ReadLine()
        {
            return Console.ReadLine().Split(' ');
        }
        public static void print(long s)
        {
            Console.WriteLine(s);
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;

namespace trenvk
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] nm = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int res = 0;

            for (int i = 1; i <= nm[0]; i++)
            {
                res += (nm[1] + i) / 5 - (i + 1) / 5;
                if ((i + 1) % 5 == 0) res++;

            }
            Console.Write(res);
        }
    }
}

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Globalization;

namespace CodeForces
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			int[] nums = Console.ReadLine ().Split (' ').Select (int.Parse).ToArray ();
			int n = nums [0];
			int m = nums [1];
			long result = (n / 5) * (m / 5);
			result += ((n + 4) / 5) * ((m + 1) / 5);
			result += ((n + 3) / 5) * ((m + 2) / 5);
			result += ((n + 2) / 5) * ((m + 3) / 5);
			result += ((n + 1) / 5) * ((m + 4) / 5);
			Console.WriteLine (result);
		}
	}
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;

public static class A___Alyona_and_Numbers
{
    private static void Solve()
    {
        int n = ReadInt();
        int m = ReadInt();
        int[] nRemainderFrequency = new int[5];
        int[] mRemainderFrequency = new int[5];

        for (int i = 1; i <= n; i++)
        {
            int rem = i % 5;
            nRemainderFrequency[rem]++;
        }

        for (int j = 1; j <= m; j++)
        {
            int rem = j % 5;
            mRemainderFrequency[rem]++;
        }

        long totalPairs = nRemainderFrequency[0] * mRemainderFrequency[0];
        for (int i = 1; i <= 4; i++)
        {
            int iPairs = nRemainderFrequency[i] * mRemainderFrequency[5-i];
            totalPairs += iPairs;
        }

        Write(totalPairs);
    }

    #region Main

    private static TextReader reader;
    private static TextWriter writer;
    public static void Main()
    {
#if DEBUG
        //reader = new StreamReader("C:\\Users\\Axel\\Desktop\\input.txt");
        reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            Solve();
            //var thread = new Thread(new A___Alyona_and_Numbers().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string Read() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(Read()); }
    public static long ReadLong() { return long.Parse(Read()); }
    public static double ReadDouble() { return double.Parse(Read(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;

public static class A___Alyona_and_Numbers
{
    private static void Solve()
    {
        int n = ReadInt();
        int m = ReadInt();
        int[] nRemainderFrequency = new int[5];
        int[] mRemainderFrequency = new int[5];
        Array.Clear(nRemainderFrequency, 0, 5);
        Array.Clear(mRemainderFrequency, 0, 5);

        for (int i = 1; i <= n; i++)
        {
            int rem = i % 5;
            nRemainderFrequency[rem]++;
        }

        for (int j = 1; j <= m; j++)
        {
            int rem = j % 5;
            mRemainderFrequency[rem]++;
        }

        int totalPairs = nRemainderFrequency[0] * mRemainderFrequency[0];
        for (int i = 1; i <= 4; i++)
        {
            int iPairs = nRemainderFrequency[i] * mRemainderFrequency[5-i];
            totalPairs += iPairs;
        }

        Write(totalPairs);
    }

    #region Main

    private static TextReader reader;
    private static TextWriter writer;
    public static void Main()
    {
#if DEBUG
        //reader = new StreamReader("C:\\Users\\Axel\\Desktop\\input.txt");
        reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            Solve();
            //var thread = new Thread(new A___Alyona_and_Numbers().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string Read() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(Read()); }
    public static long ReadLong() { return long.Parse(Read()); }
    public static double ReadDouble() { return double.Parse(Read(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;

public static class A___Alyona_and_Numbers
{
    private static void Solve()
    {
        int n = ReadInt();
        int m = ReadInt();
        int[] nRemainderFrequency = new int[5];
        int[] mRemainderFrequency = new int[5];

        for (int i = 1; i <= n; i++)
        {
            int rem = i % 5;
            nRemainderFrequency[rem]++;
        }

        for (int j = 1; j <= m; j++)
        {
            int rem = j % 5;
            mRemainderFrequency[rem]++;
        }

        BigInteger totalPairs = nRemainderFrequency[0] * mRemainderFrequency[0];
        for (int i = 1; i <= 4; i++)
        {
            BigInteger iPairs = nRemainderFrequency[i] * mRemainderFrequency[5-i];
            totalPairs += iPairs;
        }

        Write(totalPairs);
    }

    #region Main

    private static TextReader reader;
    private static TextWriter writer;
    public static void Main()
    {
#if DEBUG
        //reader = new StreamReader("C:\\Users\\Axel\\Desktop\\input.txt");
        reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("input.txt");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            Solve();
            //var thread = new Thread(new A___Alyona_and_Numbers().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
#if DEBUG
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string Read() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(Read()); }
    public static long ReadLong() { return long.Parse(Read()); }
    public static double ReadDouble() { return double.Parse(Read(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExInCsharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string str1 = Console.ReadLine();
            int x=0, y=0, m, n;
            bool f = false;
            string[] str = str1.Split(' ');
            n = int.Parse(str[0]); m = int.Parse(str[1]);
            for (int i = 1; i <= n; i++ )
            {
                for (int j=1; j<=m; j++)
                {
                    if ((i+j)%5==0)
                    {
                        x += (m - j) / 5 + 1;
                        break;
                    }
                }

            }

            Console.WriteLine(x);

        }
    }
}

using System;
using System.Collections.Generic;
using System.IO.Pipes;
using System.Linq;
using System.Security.AccessControl;
using System.Text;

namespace codeforces
{
	class Program
	{
		public class User
		{
			public int c;

			public int r;
		}

		public class Point
		{
			public int x;

			public int y;
		}

		public class Comparer : IComparer<User>
		{
			public int Compare(User x, User y)
			{
				if (x.c < y.c || (x.c == y.c && x.r < y.r))
					return -1;
				return 1;
			}
		}

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

		public static void WriteYESNO(bool x, string yes = "YES", string no = "NO")
		{
			if (x)
				Console.WriteLine(yes);
			else
			{
				Console.WriteLine(no);
			}
		}

		public static string getString()
		{
			return Console.ReadLine();
		}

		public static List<int> getList()
		{
			var s = Console.ReadLine();
			return s.Split(' ').Select(int.Parse).ToList();
		}

		public static int Min(int x, int y)
		{
			return Math.Min(x, y);
		}

		public static int Max(int x, int y)
		{
			return Math.Max(x, y);
		}

		public static int Abs(int x)
		{
			return Math.Abs(x);
		}

		public static int getInt()
		{
			var s = Console.ReadLine();
			return int.Parse(s);
		}

		public static bool Equal(int x, int y, int x1, int y1)
		{
			return x == x1 && y == y1;
		}

		public class Vertex
		{
			public List<int> edges;

			public int ct;

			public Vertex()
			{
				ct = 0;
				edges = new List<int>();
				for (var i = 0; i < 26; ++i)
					edges.Add(0);
			}
		}

		private static void Main(string[] args)
		{
/*			var input = new StreamReader("input.txt");
			var output = new StreamWriter("output.txt");*/
			var a = getList();
			long ans = 0;
			for (var i = 0; i < 5; ++i)
			{
				var t = a[0] / 5;
				t = t + ((a[0] % 5 >= i && i != 0) ? 1 : 0);
				var t1 = a[1] / 5;
				t1 = t1 + (a[1] % 5 >= (5 - i) ? 1 : 0);
				ans += t * t1;
			}
			Console.WriteLine(ans);
		}
	}
}