//package cf;
import java.io.*;
import java.util.*;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
    static int p=1000000007;
    static int dp[]=new int[100000];
    public static void main(String[] args) throws Exception{
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc=new FastReader();
        int tc=sc.nextInt();
        int ar[]=new int[tc];
        for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt();
        int dp1[]=new int[tc];
        dp1[0]=0;
        //dp1[1]=Math.abs(ar[1]-ar[0]);
        for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        }
      //  System.out.println(Arrays.toString(dp1));

        //Arrays.fill(dp,-1);

        //System.out.println(frog(ar,0)+" "+Arrays.toString(dp));

        out.write(dp1[tc-1]+"");
        out.flush();
    }
    public static  int frog(int ar[],int i)
    {
        if(i==ar.length-1)
            return 0;
        if(i>=ar.length)
            return Integer.MAX_VALUE;
        if(dp[i]!=-1)
            return dp[i];

        int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1);
        int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2));

            dp[i]=Math.min(r1,r2);
            //System.out.println(i+" "+dp[i]+" "+frog(ar,i+1));
            return dp[i];
    }






///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

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

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

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

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

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

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


} import java.io.*; io.* java import java.util.*; util.* java import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    static int p=1000000007;
    static int dp[]=new int[100000];
    public static void main(String[] args) throws Exception{
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc=new FastReader();
        int tc=sc.nextInt();
        int ar[]=new int[tc];
        for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt();
        int dp1[]=new int[tc];
        dp1[0]=0;
        //dp1[1]=Math.abs(ar[1]-ar[0]);
        for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        }
      //  System.out.println(Arrays.toString(dp1));

        //Arrays.fill(dp,-1);

        //System.out.println(frog(ar,0)+" "+Arrays.toString(dp));

        out.write(dp1[tc-1]+"");
        out.flush();
    }
    public static  int frog(int ar[],int i)
    {
        if(i==ar.length-1)
            return 0;
        if(i>=ar.length)
            return Integer.MAX_VALUE;
        if(dp[i]!=-1)
            return dp[i];

        int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1);
        int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2));

            dp[i]=Math.min(r1,r2);
            //System.out.println(i+" "+dp[i]+" "+frog(ar,i+1));
            return dp[i];
    }






///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

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

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

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

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

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

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


} Main static int p=1000000007; p 1000000007 static int dp[]=new int[100000]; dp new int[100000] 100000 public static void main(String[] args) throws Exception{
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc=new FastReader();
        int tc=sc.nextInt();
        int ar[]=new int[tc];
        for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt();
        int dp1[]=new int[tc];
        dp1[0]=0;
        //dp1[1]=Math.abs(ar[1]-ar[0]);
        for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        }
      //  System.out.println(Arrays.toString(dp1));

        //Arrays.fill(dp,-1);

        //System.out.println(frog(ar,0)+" "+Arrays.toString(dp));

        out.write(dp1[tc-1]+"");
        out.flush();
    } main {
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc=new FastReader();
        int tc=sc.nextInt();
        int ar[]=new int[tc];
        for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt();
        int dp1[]=new int[tc];
        dp1[0]=0;
        //dp1[1]=Math.abs(ar[1]-ar[0]);
        for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        }
      //  System.out.println(Arrays.toString(dp1));

        //Arrays.fill(dp,-1);

        //System.out.println(frog(ar,0)+" "+Arrays.toString(dp));

        out.write(dp1[tc-1]+"");
        out.flush();
    } BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512); out new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512) FastReader sc=new FastReader(); sc new FastReader() int tc=sc.nextInt(); tc sc.nextInt() sc.nextInt sc int ar[]=new int[tc]; ar new int[tc] tc for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt(); int i=0; int i=0; i 0 i<tc i tc i++ i++ i ar[i]=sc.nextInt(); ar[i]=sc.nextInt() ar[i] ar i sc.nextInt() sc.nextInt sc int dp1[]=new int[tc]; dp1 new int[tc] tc dp1[0]=0 dp1[0] dp1 0 0 for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        } int i=1; int i=1; i 1 i<tc i tc i++ i++ i {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        } {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        } dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2])) dp1[i] dp1 i Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2])) Math.min Math (Math.abs(ar[i]-ar[i-1]))+dp1[i-1] (Math.abs(ar[i]-ar[i-1])) Math.abs Math ar[i]-ar[i-1] ar[i] ar i ar[i-1] ar i-1 i 1 dp1[i-1] dp1 i-1 i 1 i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]) i-2<0 i-2 i 2 0 Integer.MAX_VALUE Integer Integer.MAX_VALUE (Math.abs(ar[i]-ar[i-2])+dp1[i-2]) Math.abs(ar[i]-ar[i-2]) Math.abs Math ar[i]-ar[i-2] ar[i] ar i ar[i-2] ar i-2 i 2 dp1[i-2] dp1 i-2 i 2 out.write(dp1[tc-1]+"") out.write out dp1[tc-1]+"" dp1[tc-1] dp1 tc-1 tc 1 "" out.flush() out.flush out String[] args args public static  int frog(int ar[],int i)
    {
        if(i==ar.length-1)
            return 0;
        if(i>=ar.length)
            return Integer.MAX_VALUE;
        if(dp[i]!=-1)
            return dp[i];

        int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1);
        int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2));

            dp[i]=Math.min(r1,r2);
            //System.out.println(i+" "+dp[i]+" "+frog(ar,i+1));
            return dp[i];
    } frog {
        if(i==ar.length-1)
            return 0;
        if(i>=ar.length)
            return Integer.MAX_VALUE;
        if(dp[i]!=-1)
            return dp[i];

        int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1);
        int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2));

            dp[i]=Math.min(r1,r2);
            //System.out.println(i+" "+dp[i]+" "+frog(ar,i+1));
            return dp[i];
    } if(i==ar.length-1)
            return 0; i==ar.length-1 i ar.length-1 ar.length ar ar.length 1 return 0; 0 if(i>=ar.length)
            return Integer.MAX_VALUE; i>=ar.length i ar.length ar ar.length return Integer.MAX_VALUE; Integer.MAX_VALUE Integer Integer.MAX_VALUE if(dp[i]!=-1)
            return dp[i]; dp[i]!=-1 dp[i] dp i -1 1 return dp[i]; dp[i] dp i int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1); r1 Math.abs(ar[i]-ar[i+1])+frog(ar,i+1) Math.abs(ar[i]-ar[i+1]) Math.abs Math ar[i]-ar[i+1] ar[i] ar i ar[i+1] ar i+1 i 1 frog(ar,i+1) frog ar i+1 i 1 int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2)); r2 i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2)) i+2>=ar.length i+2 i 2 ar.length ar ar.length Integer.MAX_VALUE Integer Integer.MAX_VALUE (Math.abs(ar[i]-ar[i+2])+frog(ar,i+2)) Math.abs(ar[i]-ar[i+2]) Math.abs Math ar[i]-ar[i+2] ar[i] ar i ar[i+2] ar i+2 i 2 frog(ar,i+2) frog ar i+2 i 2 dp[i]=Math.min(r1,r2) dp[i] dp i Math.min(r1,r2) Math.min Math r1 r2 return dp[i]; dp[i] dp i int ar[] ar int i i     static class FastReader {

        BufferedReader br;
        StringTokenizer st;

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

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

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

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

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        } FastReader {
            br = new BufferedReader(new InputStreamReader(System.in));
        } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
    static int p=1000000007;
    static int dp[]=new int[100000];
    public static void main(String[] args) throws Exception{
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc=new FastReader();
        int tc=sc.nextInt();
        int ar[]=new int[tc];
        for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt();
        int dp1[]=new int[tc];
        dp1[0]=0;
        //dp1[1]=Math.abs(ar[1]-ar[0]);
        for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        }
      //  System.out.println(Arrays.toString(dp1));

        //Arrays.fill(dp,-1);

        //System.out.println(frog(ar,0)+" "+Arrays.toString(dp));

        out.write(dp1[tc-1]+"");
        out.flush();
    }
    public static  int frog(int ar[],int i)
    {
        if(i==ar.length-1)
            return 0;
        if(i>=ar.length)
            return Integer.MAX_VALUE;
        if(dp[i]!=-1)
            return dp[i];

        int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1);
        int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2));

            dp[i]=Math.min(r1,r2);
            //System.out.println(i+" "+dp[i]+" "+frog(ar,i+1));
            return dp[i];
    }






///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

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

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

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

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

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

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


} public class Main {
    static int p=1000000007;
    static int dp[]=new int[100000];
    public static void main(String[] args) throws Exception{
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc=new FastReader();
        int tc=sc.nextInt();
        int ar[]=new int[tc];
        for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt();
        int dp1[]=new int[tc];
        dp1[0]=0;
        //dp1[1]=Math.abs(ar[1]-ar[0]);
        for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        }
      //  System.out.println(Arrays.toString(dp1));

        //Arrays.fill(dp,-1);

        //System.out.println(frog(ar,0)+" "+Arrays.toString(dp));

        out.write(dp1[tc-1]+"");
        out.flush();
    }
    public static  int frog(int ar[],int i)
    {
        if(i==ar.length-1)
            return 0;
        if(i>=ar.length)
            return Integer.MAX_VALUE;
        if(dp[i]!=-1)
            return dp[i];

        int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1);
        int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2));

            dp[i]=Math.min(r1,r2);
            //System.out.println(i+" "+dp[i]+" "+frog(ar,i+1));
            return dp[i];
    }






///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

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

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

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

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

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

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


} Main
//package cf;
import java.io.*;
import java.util.*;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
    static int p=1000000007;
    static int dp[]=new int[100000];
    public static void main(String[] args) throws Exception{
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc=new FastReader();
        int tc=sc.nextInt();
        int ar[]=new int[tc];
        for(int i=0;i<tc;i++)
            ar[i]=sc.nextInt();
        int dp1[]=new int[tc];
        dp1[0]=0;
        //dp1[1]=Math.abs(ar[1]-ar[0]);
        for(int i=1;i<tc;i++)
        {
            dp1[i]=Math.min((Math.abs(ar[i]-ar[i-1]))+dp1[i-1],i-2<0?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i-2])+dp1[i-2]));
        }
      //  System.out.println(Arrays.toString(dp1));

        //Arrays.fill(dp,-1);

        //System.out.println(frog(ar,0)+" "+Arrays.toString(dp));

        out.write(dp1[tc-1]+"");
        out.flush();
    }
    public static  int frog(int ar[],int i)
    {
        if(i==ar.length-1)
            return 0;
        if(i>=ar.length)
            return Integer.MAX_VALUE;
        if(dp[i]!=-1)
            return dp[i];

        int r1=Math.abs(ar[i]-ar[i+1])+frog(ar,i+1);
        int r2=i+2>=ar.length?Integer.MAX_VALUE:(Math.abs(ar[i]-ar[i+2])+frog(ar,i+2));

            dp[i]=Math.min(r1,r2);
            //System.out.println(i+" "+dp[i]+" "+frog(ar,i+1));
            return dp[i];
    }






///////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

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

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

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

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

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

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


}
