p01502 Sightseeing Tour
Example

Input

3
0 2 7
2 0 4
5 8 0


Output

11
```python
import sys

def main():
    n = int(input())
    edges = []
    for i in range(n):
        edges.append( list(map(int, sys.stdin.readline().split())) )
    
    # ?±?????????????????????????????????°??????
    # ????????????????????°?????????????????????????????????????????¨????????????
    # ??????????????????????????¨????¨?????????????????????§????´?????°???????????????????????????°??????

    ans = 0
    for i in range(n - 1):
        for j in range(i + 1, n):
            ans += min(edges[i][j], edges[j][i])

    print(ans)

if __name__ == '__main__':
    main()
```