import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.Iterator; public class Main_yukicoder325 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Printer pr = new Printer(System.out); long x1 = sc.nextInt(); long y1 = sc.nextInt(); long x2 = sc.nextInt(); long y2 = sc.nextInt(); long d = sc.nextInt(); if (x1 > 0) { x2 -= x1; d -= x1; x1 -= x1; } if (y1 > 0) { y2 -= y1; d -= y1; y1 -= y1; } if (x2 < 0) { x1 -= x2; d -= Math.abs(x2); x2 -= x2; } if (y2 < 0) { y1 -= y2; d -= Math.abs(y2); y2 -= y2; } if (d < 0) { pr.println(0); pr.close(); sc.close(); return; } long ret = 0; ret += getArea(0, 0, Math.abs(x2), Math.abs(y2), d); ret += getArea(0, 0, Math.abs(x1), Math.abs(y2), d); ret += getArea(0, 0, Math.abs(x1), Math.abs(y1), d); ret += getArea(0, 0, Math.abs(x2), Math.abs(y1), d); ret -= getArea(0, 0, 0, Math.abs(y2), d); ret -= getArea(0, 0, Math.abs(x1), 0, d); ret -= getArea(0, 0, 0, Math.abs(y1), d); ret -= getArea(0, 0, Math.abs(x2), 0, d); pr.println(ret + 1); pr.close(); sc.close(); } private static long getArea(long x1, long y1, long x2, long y2, long d) { if (x2 + y2 <= d) { return (x2 + 1) * (y2 + 1); } if (x2 >= d && y2 >= d) { return (d + 1) * (d + 2) / 2; } if (x2 >= d) { return (d + 1) * (d + 2) / 2 - (d - y2) * (d - y2 + 1) / 2; } if (y2 >= d) { return (d + 1) * (d + 2) / 2 - (d - x2) * (d - x2 + 1) / 2; } else { return (x2 + 1) * (y2 + 1) - (x2 + y2 - d) * (x2 + y2 - d + 1) / 2; } } @SuppressWarnings("unused") private static class Scanner { BufferedReader br; Iterator it; Scanner (InputStream in) { br = new BufferedReader(new InputStreamReader(in)); } String next() throws RuntimeException { try { if (it == null || !it.hasNext()) { it = Arrays.asList(br.readLine().split(" ")).iterator(); } return it.next(); } catch (IOException e) { throw new IllegalStateException(); } } int nextInt() throws RuntimeException { return Integer.parseInt(next()); } long nextLong() throws RuntimeException { return Long.parseLong(next()); } float nextFloat() throws RuntimeException { return Float.parseFloat(next()); } double nextDouble() throws RuntimeException { return Double.parseDouble(next()); } void close() { try { br.close(); } catch (IOException e) { // throw new IllegalStateException(); } } } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }