public static int findMaximumPathSum(){
		String linestr; 
		String[] tokens;
		int lines = 0, i = 0;
		int j,temp;
		try{
			BufferedReader br = new BufferedReader(new FileReader("triangle"));
			LineNumberReader reader = new LineNumberReader(new BufferedReader(new FileReader("triangle")));

			while((reader.readLine()) != null){
				lines++;
			}

			triangle = new int[lines][lines];
			while(((linestr = br.readLine())) != null){
				tokens = linestr.split(" ");
				for(j = 0; j < tokens.length; j++){
					temp = Integer.parseInt(tokens[j]);
					triangle[i][j] = temp;
				}
				i++;
      		}
			for(i = lines-1; i > 0; i--){
				for(j = 0; j < lines - 1; j++){
            	triangle[i-1][j] += (triangle[i][j] > triangle[i][j+1]) ? triangle[i][j]: triangle[i][j+1];
				}
			}
      		return triangle[0][0];
		} catch (FileNotFoundException e){
    		System.out.println(e);
		} catch (IOException e){
			System.out.println(e);
		}
		return 0;
	}